[plt-scheme] List loop timing

From: Prabhakar Ragde (plragde at uwaterloo.ca)
Date: Fri Feb 15 12:10:16 EST 2008

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. Writing `reverse' without using 
tail recursion is apt to result in something that takes much longer.

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. --PR

Posted on the users mailing list.