3 ms·
I've seen increasing levels of unpredictability at a surface level with all languages as compilers have improved. The difference between a constant expression b
by aardvark179 11y ago
I've seen increasing levels of unpredictability at a surface level with all languages as compilers have improved. The difference between a constant expression being folded or not can be easily of the order of 1000x (once it has been propagated through loops etc.). If you've still got the source for your tests then it's well worth looking at the IR emitted and the assembly produced from that to see where those differences are coming from.
- mpweiher 11y agoYes, with enough information, sometimes the compiler can compute the result of a loop and then discard the loop itself. I made sure this wasn't happening.