[fetter-devel] Verrazano Speedup

Daniel Herring dherring at tentpost.com
Fri Jan 26 05:57:58 UTC 2007


On Wed, 24 Jan 2007, Christian Lynbech wrote:
> I just discovered that the fix needs a fix, like the following
> version:
>
>        (defmacro push-end (value lst)
>          `(setf ,lst (nconc ,lst (list ,value))))
>
> Without the explicit setf, the value change may get lost as nconc is a
> destructive function.

Mea culpa.

Please ignore my "speedup".  As Christian found, it is just a variant on 
lossy compression.  The original code was just fine.

- Daniel

P.S.  My code was wrong since lst is initialized to nil; the nconc creates 
a new list in this case.  Initializing lst to something like (list 1) and 
later using (cdr lst) results in the same ~90s timings as before.



More information about the fetter-devel mailing list