[plt-scheme] List loop timing
On Feb 15, 2008, at 12:10 PM, Prabhakar Ragde wrote:
> Matthias Felleisen wrote:
>
>> * It is a COMMON misunderstanding that TR versions of a function
>> do something good for your timing.
>> ************************************
>> TR is a space-saving device. PERIOD.
>> ************************************
>> It does nothing for time.
>
> Except when it does something for time.
Sometimes. It is NOT uniform!!!!
> It is more accurate to say that between TR and non-TR versions of a
> function with the same asymptotic running time, the constant factor
> is not necessarily smaller for the TR version
True.
;; ---
And the only way to benchmark such universal claims properly is to
use high-quality implementations. With that I don't mean something
easy to install and run or cheap to buy. I am referring to compilers
with highly tuned optimizers. While there are more actively
maintained Scheme implementations than SML users, only Chez and
Larceny come to my mind when I use this kind of constraint. (I am
sure I am overlooking one or two compilers with similar qualities,
but that's only true on highly optimistic days.)
-- Matthias
P.S. Plus watch out for which platform the compilers were tuned. They
may not correspond to the popular ones.