4 ms·
> Keeping everything the same, if you can rewrite your code so that it generates fewer instructions, it should be faster. Not necessarily. Sometimes those addi
by Akronymus 4y ago
> Keeping everything the same, if you can rewrite your code so that it generates fewer instructions, it should be faster.
Not necessarily. Sometimes those additional instructions allow you to vectorize loops through eliminating the need for one loop iteration to depend on the previous one. For example: https://stackoverflow.com/questions/72306573/why-does-this-code-execute-more-slowly-after-strength-reducing-multiplications-t https://stackoverflow.com/questions/72306573/why-does-this-c...