News for hackers. Stuff that matters.
Re:Understanding CPU port contention by BeeOnRope on Saturday March 24, 2018 @12:02AM (#16664796)
Compilers 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.

There are no comments on this comment yet.