From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/64386 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.gnus.general Subject: Re: dolist vs. while-loop (was Re: epg and expired recipient keys) Date: Thu, 08 Mar 2007 23:55:18 +0900 Message-ID: <87vehbpyy1.fsf@catnip.gol.com> References: <87649ro899.fsf@wheatstone.g10code.de> <87y7mlgl9f.fsf@wheatstone.g10code.de> <56d409a7-d8c0-4e74-be44-824f942fd4e5@well-done.deisui.org> <87zm71f0sl.fsf@wheatstone.g10code.de> <867itvcdve.fsf@hondo.cadr.de> <87vehc276e.fsf@catnip.gol.com> <87k5xs26v2.fsf@catnip.gol.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1173365813 30420 80.91.229.12 (8 Mar 2007 14:56:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 8 Mar 2007 14:56:53 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M12910@lists.math.uh.edu Thu Mar 08 15:56:46 2007 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1HPK2s-0001wa-3Z for ding-account@gmane.org; Thu, 08 Mar 2007 15:56:42 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1HPK1w-000537-KX; Thu, 08 Mar 2007 08:55:44 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1HPK1u-00052s-FR for ding@lists.math.uh.edu; Thu, 08 Mar 2007 08:55:42 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.63) (envelope-from ) id 1HPK1o-00076Y-Fp for ding@lists.math.uh.edu; Thu, 08 Mar 2007 08:55:42 -0600 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1HPK1m-00065T-00 for ; Thu, 08 Mar 2007 15:55:34 +0100 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HPK1h-0006jK-E0 for ding@gnus.org; Thu, 08 Mar 2007 15:55:29 +0100 Original-Received: from 203-216-97-073.dsl.gol.ne.jp ([203.216.97.73]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Mar 2007 15:55:29 +0100 Original-Received: from miles by 203-216-97-073.dsl.gol.ne.jp with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Mar 2007 15:55:29 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 18 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 203-216-97-073.dsl.gol.ne.jp System-Type: i686-pc-linux-gnu Cancel-Lock: sha1:9849yWKLoKPQvE+9XNwppOaJHp4= X-Spam-Score: -2.5 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:64386 Archived-At: Katsumi Yamaoka writes: > I also used Lars' benchmark.el. Please note that the later test > has nested two dolist forms like the one that Wolfram Fenske wrote. > I guess the reason it is slower than the while-loop version is that > the `let' form in the inside dolist is used many times. It doesn't do any binding in the inner loop though. let-binding has some cost in elisp, but getting rid of lets (like using while instead of dolist) is something you do when you desperately need speed; otherwise the decrease in readability is simply not worth it. -Miles -- What the fuck do white people have to be blue about!? Banana Republic ran out of Khakis? The Espresso Machine is jammed? Hootie and The Blowfish are breaking up??! Shit, white people oughtta understand, their job is to GIVE people the blues, not to get them! -- George Carlin