3 ms·
It's common for small changes in code, or even the alignment of code (moving it all up/down memory) to have surprising results in the performance of the resulti
by CJefferson 10y ago
It's common for small changes in code, or even the alignment of code (moving it all up/down memory) to have surprising results in the performance of the resulting code, due to things like page alignment.
Here is a random example (you can find lots of others):
http://stackoverflow.com/questions/17896714/why-would-introducing-useless-mov-instructions-speed-up-a-tight-loop-in-x86-64-a
- metaphor 10y agoHmmm...perhaps a rephrasing of the question given this particular example. Which would you consider to be the surprising part: ~0.75% average execution speed slowdown, or on the order of tens of milliseconds slowdown? W.r.t. page alignment, thought you may find this to be an interesting counter example[1]. [1] http://danluu.com/3c-conflict/ http://danluu.com/3c-conflict/