Massive slowdown with Vectors as well as slightly different loop, can't figure out why

In certain situations when the array is big and not accessed via a pointer (explicitly).

My knowledge about that problem isn’t super in-depth, but I think this workaround works reliably, when you encounter the problem: