And just to be clear, I do agree with everything you’re saying here, but I do think you’re still being overly pedantic.
> Less pedantically a sorting function that is far more efficient will result in the instructions corresponding to individual operations being called thousands of times less.
Exactly. The goal is to spend fewer instructions to achieve the same outcome. As soon as you start thinking about how different instructions take different amounts of cycles and you can speed up an algorithm by using more instructions that are cheaper, that kind of proves my whole point. You can speed up an algorithm by using more instructions, but you have to be intentional about it. The default will never be: more instructions = faster.
Basically,
> You can speed up an algorithm by using more instructions, but you have to be intentional about it.
I feel like most code is written with some intention. It depends on whether or not you believe that most code is written competently, I guess.
It is actually the core of the entire understanding. There is no mapping whatsoever lines of code and instructions executed. A finite program that doesn't halt will result in infinite instructions. Less pedantically a sorting function that is far more efficient will result in the instructions corresponding to individual operations being called thousands of times less.
Basically everything from function calls to loops ruins any mapping between brevity and execution time.