4 ms·
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 sinc
by to3m 12y ago
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.