In the above link, it is mentioned that
indexed access can be slower (as it needs to be bounds checked) and may prevent various compiler optimisations.
I did check how two different versions of array accesses(indexing vs iterators) are compiled down to assembly with [https://godbolt.org/](Compiler Explorer). I would love to learn more about how array accesses can actually prevent various compiler optimisations, but currently I can't think of any optimizations that could be prevented by array accesses. Any advice would be greatly appreciated! Thank you