[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] use tail pointer for LOOP
From: |
Thien-Thi Nguyen |
Subject: |
Re: [PATCH] use tail pointer for LOOP |
Date: |
Thu, 17 Jun 2010 09:18:28 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
() address@hidden
() Thu, 17 Jun 2010 07:10:21 +0200
Still, reversing seems to be worth it (by some 30 percent).
Unless we find some way to streamline the tail pointer better.
How does this variant fare?
(defun copy3 (lst)
"Return a copy of LST."
(let* ((box (list nil))
(tp box))
(while lst
(setq tp (cdr (nconc tp (list (pop lst))))))
(cdr box)))
thi