Re: How much tuning does regular lisp compilers do?



rpw3@xxxxxxxx (Rob Warnock) wrote on Fri, 29 Aug 2008:
For example, in CMUCL, consider these successive trials:
cmu> (time (dotimes (i 2000000000)))
Note that the same loop took ~4, ~4, ~2, & ~4 CPU cycles/iteration.

Shouldn't you first compile code, that you want to time?

Why? Because the third compilation was more optimally placed for
the CPU's branch prediction (Athlon-32, as it happens).

If you're running interpreted code, how can you be so certain that this
is the correct explanation for the difference in run times?

-- Don
_______________________________________________________________________________
Don Geddis http://don.geddis.org/ don@xxxxxxxxxx
I think there should be something in science called the "reindeer effect." I
don't know what it would be, but I think it'd be good to hear someone say,
"Gentlemen, what we have here is a terrifying example of the reindeer effect."
-- Deep Thoughts by Jack Handey [SNL]
.