Engine optimizations

As mentioned on that StackOverflow question there isn’t any improvement really. In optimized builds the compiler already does whatever it can do based on data dependency so the assembly generated is the same (or at least it is on Microsoft’s compiler and other compilers I have used such as SNC). The reason you can to use const correctness isn’t about performance but about being explicit about the intention of the code in terms of data changes. A more important type qualifier to use in terms of performance is restrict rather than const (where applicable).

BTW I added a new article to the series. Reduced CPU time by 50% on the top hotspot. Unreal Engine 4 GPU particle system micro-optimizations. Part 3.