why the hell the compiler would optimize away just one loop? That's really obscure
I have absolutely no idea. None. Zip. Nada!
Whilst x64 asm is still fairly new to me, and the syntax and opcodes are sufficiently different from x86 to make it difficult to read at times -- especially with the interleaving of opcodes to keep the pipelines busy -- but I've been inspecting the asm output from compilers long enough now that I can usually postulate a reason why they optimise things in a particular way; but this has me stumped.
Why for two essentially similar loops, one would get optimised away and the other not...
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
|