News for hackers. Stuff that matters.
Re:Gallery of Processor Cache Effects by to3m on Sunday December 21, 2014 @01:01PM (#8780362)
Perhaps the result is an average rather than the best result?

I wondered about this too so I tried it on my PC, though I had to make up my own timing code since the author doesn't say what he was doing. Results for me were more in line with what I'd expect, with both 4-variable cases being the same speed and the 2-variable one being a bit quicker. (All the data for the loop will fit into 2 or 3 cache lines so I don't think there's much chance you'll see any memory effects being measured.)

This is compiling for x64.

There are no comments on this comment yet.