The first decades of programming required writing machine commands so that electronic devices could execute them. Not only was it a tedious and error-prone endeavor, but it also required you to write the instructions in a manner that yielded the best performance possible because the computers were slow and did not do much code optimization, if at all.
Since then, we have made a lot of progress in both hardware and programming. The modern compiler went a long way towards making the submitted code work as fast as possible, even when a programmer did not think about it. We talked about it with specific examples in the previous chapter, Chapter 17, Java Microbenchmark Harness.
It allowed programmers to write more lines of code without thinking much about the optimization. But tradition and many books about programming continued to call for it, and some...