From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: return Date: Fri, 03 Dec 2010 20:35:34 -0500 Message-ID: References: <87hbeu7l84.fsf@stupidchicken.com> <87bp52ae9g.fsf@catnip.gol.com> <87r5dyfxmn.fsf@stupidchicken.com> <87ei9y5z0v.fsf@stupidchicken.com> <87r5dy7989.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1291426567 2744 80.91.229.12 (4 Dec 2010 01:36:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 4 Dec 2010 01:36:07 +0000 (UTC) Cc: emacs-devel@gnu.org, Miles Bader To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 04 02:35:59 2010 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 1POh2c-0005jw-Rf for ged-emacs-devel@m.gmane.org; Sat, 04 Dec 2010 02:35:59 +0100 Original-Received: from localhost ([127.0.0.1]:58283 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POh2c-0006OB-4g for ged-emacs-devel@m.gmane.org; Fri, 03 Dec 2010 20:35:58 -0500 Original-Received: from [140.186.70.92] (port=51245 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POh2U-0006Ms-Ax for emacs-devel@gnu.org; Fri, 03 Dec 2010 20:35:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1POh2T-0004mn-Ar for emacs-devel@gnu.org; Fri, 03 Dec 2010 20:35:50 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:33415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1POh2R-0004m4-Py; Fri, 03 Dec 2010 20:35:47 -0500 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id oB41ZaIv002465; Fri, 3 Dec 2010 20:35:37 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id B42B9A8364; Fri, 3 Dec 2010 20:35:34 -0500 (EST) In-Reply-To: <87r5dy7989.fsf@stupidchicken.com> (Chong Yidong's message of "Fri, 03 Dec 2010 18:00:22 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3698=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:133381 Archived-At: > Hmm, yes, I was testing on interpreted code. Here is a new test using a > byte-compiled file: > (defun test-loop-nocatch () > (dotimes (ii 2000000) > (let ((ll '(1 2 3 4 5 6 7 8 9 10))) > (while ll > (setq ll (cdr ll)))))) > Averaging over ten runs, this takes 1.351 +- 0.022s without an internal > catch, and 1.371 +- 0.034s with an internal catch. The Fwhile function is not used in the byte-compiled version of the `while' special form. Instead, the byte-compiler turns it into a bunch of byte-codes like test and jump to label. So your "with an internal catch" version should perform 100% identically in this test ;-) Stefan