← Back to context

Comment by emilfihlman

6 years ago

>That said, "hundreds of executed instructions" are literally not a concern with present-day hardware

People really need to stop saying this and stop accepting it as a "truth". It only applies in _some_ applications, and even there it stops applying once you want to do it many times over and over again.

It is "truth" in many cases. On a reasonably high-frequency, high-core count chip, instructions are almost free once you've managed to saturate your memory bandwidth. (Of course, that assumes that the code itself is "hot" enough that it's in cache somewhere, but this is the common case.)

  • But more instructions means a smaller portion of your code will fit in cache which means its less likely for any given code to be "hot".