Code is written for people
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. This is 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 terms of both hardware and programming. The modern compiler went a long way toward making the submitted code work as fast as possible, even when a programmer did not think about it. We talked about this with specific examples in the previous chapter.
It allowed programmers to write more lines of code without thinking much about optimization. But tradition and many books about programming continued to call for it, and some programmers still worry about their code performance – more so than the results it produces. It is easier to follow...