[plt-scheme] List loop timing

From: Carl Eastlund (cce at ccs.neu.edu)
Date: Fri Feb 15 12:20:32 EST 2008

On Fri, Feb 15, 2008 at 12:10 PM, Prabhakar Ragde <plragde at uwaterloo.ca> wrote:
>
>  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

What non-tail-recursive version of reverse are you comparing here?  It
can be written non-tail-recursively and still have the same asymptotic
complexity, and quite possibly the same or similar running time.

-- 
Carl Eastlund


Posted on the users mailing list.