From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: return Date: Fri, 03 Dec 2010 22:23:05 -0500 Message-ID: <87mxomrzl2.fsf@stupidchicken.com> 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 1291433001 22103 80.91.229.12 (4 Dec 2010 03:23:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 4 Dec 2010 03:23:21 +0000 (UTC) Cc: emacs-devel@gnu.org, Miles Bader To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 04 04:23:16 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 1POiiS-0007rs-DE for ged-emacs-devel@m.gmane.org; Sat, 04 Dec 2010 04:23:16 +0100 Original-Received: from localhost ([127.0.0.1]:46469 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POiiR-0007rd-SX for ged-emacs-devel@m.gmane.org; Fri, 03 Dec 2010 22:23:15 -0500 Original-Received: from [140.186.70.92] (port=58251 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POiiN-0007rW-AN for emacs-devel@gnu.org; Fri, 03 Dec 2010 22:23:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1POiiM-0002fI-Bi for emacs-devel@gnu.org; Fri, 03 Dec 2010 22:23:11 -0500 Original-Received: from vm-emlprdomr-04.its.yale.edu ([130.132.50.145]:58992) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1POiiK-0002f1-Ow; Fri, 03 Dec 2010 22:23:08 -0500 Original-Received: from furball (dhcp128036014088.central.yale.edu [128.36.14.88]) (authenticated bits=0) by vm-emlprdomr-04.its.yale.edu (8.14.4/8.14.4) with ESMTP id oB43N6Wc004726 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 3 Dec 2010 22:23:07 -0500 Original-Received: by furball (Postfix, from userid 1000) id 136C4160675; Fri, 3 Dec 2010 22:23:05 -0500 (EST) In-Reply-To: (Stefan Monnier's message of "Fri, 03 Dec 2010 20:35:34 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Scanned-By: MIMEDefang 2.71 on 130.132.50.145 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:133389 Archived-At: Stefan Monnier writes: > 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 ;-) Ah, I see. I guess the key problem is the unacceptably large performance difference, in byte compiled code, when we wrap `while' in an additional `catch' (1.75s vs 1.4s without the `catch' in my test). The `catch' byte operation does this: case Bcatch: { Lisp_Object v1; BEFORE_POTENTIAL_GC (); v1 = POP; TOP = internal_catch (TOP, Feval, v1); AFTER_POTENTIAL_GC (); break; } So presumably it's the Feval that's killing us. Hmm.