• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Loop unrolling

At least they taught what loop unrolling / rolling is on his course. Unlike most courses nowadays which consist of "using powerpoint"

On a Computer Science/Software Engineering curriculum? I don't think so.
 
At least they taught what loop unrolling / rolling is on his course. Unlike most courses nowadays which consist of "using powerpoint"

Or worse, Java.

:D

Loop unrolling would work pre Pentium 4 (I think that was the one). That's because the jump would stall the clever look ahead / out of order execution stuff. But with the P4 the clever stuff would guess the most likely outcome of a jump before it got there and assume you'd continue round the loop - no penalty at all for looping, just a small penalty for the exit case. It'd probably be faster not unrolled because there was less code to load.

I went to an Intel course once where they taught this. And what worked on the pre-P4 course (I'm racking my brain trying to remember the names) they told us to forget for the P4.
 
Loop unrolling these days is executing in parallel on multiple cores.

HTH
 

Advertisers

Back
Top