Immediately after switching the page, it will work with CSR.
Please reload your browser to see how it works.
Something that I'd like to add is that it's helpful to understand the optimization capabilities of our compiler. Ideally, we would like to write program that doesn't have what are called 'optimization-blockers' - these make it hard for the compiler to generate optimized executables.
I like the pointer to the blog on accidentally quadratic implementations. I find that the following pattern is often a landmine:
for (int i = 0; i < strlen(s); i++) // code in loop
strlen(s) gets computed every iteration, incurring O(n) time.
Finally, being aware that I/O latencies are major source of bottlenecks leads to nice optimizations. One advantage of multiple threads is that they can sometimes hide the I/O latency. In general, writing programs with good memory locality is one of the better levers for optimization.
The usual culprit is "premature modularization", where code that is used in one place and is never going to be extended is nonetheless full of indirections.