|
From: | Thien-Thi Nguyen |
Subject: | Re: [PATCH] use tail pointer for LOOP |
Date: | Thu, 17 Jun 2010 12:03:16 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
() address@hidden () Thu, 17 Jun 2010 11:22:32 +0200 Cute. You all are successfully keeping me from work. Enjoing it ;-) Here are the results. Attached the modified source. copy1: (1.058881 5 0.7366780000000048) copy2: (1.27958 6 0.8913360000000026) copy3: (1.337353 6 0.9249420000000015) Still the reverse version is the winner. Yours seems to be a tad slower (although I wouldn't know whether it's in the noise). But it looks so sharp ;-) How about this one? (defun copy4 (lst) "Return a copy of LST." (let* ((box (list nil)) (tp box)) (while lst (setq tp (setcdr tp (list (pop lst))))) (cdr box))) thi
[Prev in Thread] | Current Thread | [Next in Thread] |