Basically, a component can store data in continuous memory blocks.

So a component can store the shaders in a vector and at each iteration, at line 864 the shader is mainly retrieved from the CPU cache since each memory access store 64 bytes of contiguous data in the cache. It may be improved with prefetch techniques.

At line 868 the Render code is different for each iteration since we change of component, so the instructions will be probably reloaded from memory. It is preferable to execute the same piece of code repeatedly. It is better to have a loop for each component with an inline function. The problem with OOP is that some components are created by inheritance and are hidden to the systems, so it is impossible to loop on components and include the implicitly created ones.