4 ms·
Well, yeah. I don't know much about the current state of the art (because I don't touch the CodeGen on a daily basis), but I kind of look into the future with h
by dendibakh 9y ago
Well, yeah.
I don't know much about the current state of the art (because I don't touch the CodeGen on a daily basis), but I kind of look into the future with hope that compilers will better handle at least those "simple" cases. :)
- BeeOnRope 9y agoCompilers are rarely going to transform the 1000/1000 example into the 10/10 one, even if they were smarter. Often such a transformation is simply impossible: the effect of interleaving the instructions may be different than what the source dictates. Also the 1000/1000 example probably doesn't arise as a long stream of explicit instructions: it is probably just a short loop with 1000 iterations! That makes it even less likely that the compiler will simply start interleaving various instructions following the loop into the loop body somehow.