From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] use tail pointer for LOOP Date: Thu, 17 Jun 2010 12:03:16 +0200 Message-ID: <87iq5i563f.fsf@ambire.localdomain> References: <4C018D79.7040409@censorshipresearch.org> <4C018FD3.1020305@censorshipresearch.org> <4C01AA28.6030002@censorshipresearch.org> <9718A5AD-7A74-470B-A32D-DA14266506A3@raeburn.org> <4C01B609.6070303@censorshipresearch.org> <20100616174420.GA2847@tomas> <87fx0msv9z.fsf@lola.goethe.zz> <20100617051021.GA26623@tomas> <87mxuu5dq3.fsf@ambire.localdomain> <20100617092232.GA27846@tomas> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1276769158 28317 80.91.229.12 (17 Jun 2010 10:05:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 17 Jun 2010 10:05:58 +0000 (UTC) Cc: emacs-devel@gnu.org To: tomas@tuxteam.de Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 17 12:05:57 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OPByt-00059q-JB for ged-emacs-devel@m.gmane.org; Thu, 17 Jun 2010 12:05:55 +0200 Original-Received: from localhost ([127.0.0.1]:35162 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OPBys-0000kH-60 for ged-emacs-devel@m.gmane.org; Thu, 17 Jun 2010 06:05:54 -0400 Original-Received: from [140.186.70.92] (port=54015 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OPBye-0000hi-0R for emacs-devel@gnu.org; Thu, 17 Jun 2010 06:05:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OPByb-0007Nz-Dn for emacs-devel@gnu.org; Thu, 17 Jun 2010 06:05:39 -0400 Original-Received: from smtp208.alice.it ([82.57.200.104]:54145) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OPByb-0007DG-2p for emacs-devel@gnu.org; Thu, 17 Jun 2010 06:05:37 -0400 Original-Received: from ambire.localdomain (95.244.66.34) by smtp208.alice.it (8.5.124.05) id 4C13FF2C005847FA; Thu, 17 Jun 2010 12:05:34 +0200 Original-Received: from ttn by ambire.localdomain with local (Exim 4.69) (envelope-from ) id 1OPBwK-00028o-PR; Thu, 17 Jun 2010 12:03:16 +0200 In-Reply-To: <20100617092232.GA27846@tomas> (tomas@tuxteam.de's message of "Thu, 17 Jun 2010 11:22:32 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:126072 Archived-At: () tomas@tuxteam.de () 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