Author: Johan de Koning
Date: 01:21:28 08/23/03
Go up one level in this thread
On August 23, 2003 at 03:45:09, Johan de Koning wrote: > ... 1 extra line in main() can >easily change the runtime by 1 or 2% (for reasons I haven't fathomed yet). I mean: I do understand it depends on code alignment. I can imagine the instruction pipeline feeds at very high speed from an "open" cache line. I can also imagine it is rather complicated to have more than 1 cache line "open". But I can't imagine why I get random results. /**/ for( i = 0; i < top; i++ ) sum += i; ;;;; more: add, inc, cmp, jl more This loop usually executes in 2 cycles. But depending on the alignment I get somtimes 2.667 or 4 or 4.5 cycles. Isn't that weird?! ... Johan
This page took 0.01 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.