From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Re: please review new branch feature/byte-unwind-protect Date: Tue, 23 Jan 2018 08:50:33 -0700 Message-ID: <87zi54ing6.fsf@tromey.com> References: <87inbtnobf.fsf@tromey.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1516722575 20258 195.159.176.226 (23 Jan 2018 15:49:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 23 Jan 2018 15:49:35 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.91 (gnu/linux) Cc: emacs-devel@gnu.org To: Tom Tromey Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 23 16:49:30 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ee0p6-0004E2-4U for ged-emacs-devel@m.gmane.org; Tue, 23 Jan 2018 16:49:20 +0100 Original-Received: from localhost ([::1]:36665 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ee0r5-0008TK-1k for ged-emacs-devel@m.gmane.org; Tue, 23 Jan 2018 10:51:23 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37811) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ee0qO-0008T9-Aq for emacs-devel@gnu.org; Tue, 23 Jan 2018 10:50:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ee0qJ-0003wj-T7 for emacs-devel@gnu.org; Tue, 23 Jan 2018 10:50:40 -0500 Original-Received: from gateway31.websitewelcome.com ([192.185.144.97]:21300) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ee0qJ-0003vD-C2 for emacs-devel@gnu.org; Tue, 23 Jan 2018 10:50:35 -0500 Original-Received: from cm14.websitewelcome.com (cm14.websitewelcome.com [100.42.49.7]) by gateway31.websitewelcome.com (Postfix) with ESMTP id 257F95AA1E6 for ; Tue, 23 Jan 2018 09:50:34 -0600 (CST) Original-Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id e0qIeN5bL0aRHe0qIejx8v; Tue, 23 Jan 2018 09:50:34 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=H4pn3iUd/KgO01hJn44PUXJ3/XKznCaXbPSrZQWn+z8=; b=bJm5U2zcUdcE/3jlrXRz60lPf0 H7z7JlnyN+SVjiRsd3mxFHgTXKipb/582hFQBhRexs98Qu5aMQcSre9JBSCPQoRjiLesyWHrfk1aL EQvcTCJFoZU/troip/fKyeQje; Original-Received: from 71-218-90-63.hlrn.qwest.net ([71.218.90.63]:35720 helo=pokyo) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1ee0qH-003qjj-SC; Tue, 23 Jan 2018 09:50:33 -0600 X-Attribution: Tom In-Reply-To: (John Wiegley's message of "Tue, 23 Jan 2018 00:47:57 -0800") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 71.218.90.63 X-Source-L: No X-Exim-ID: 1ee0qH-003qjj-SC X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 71-218-90-63.hlrn.qwest.net (pokyo) [71.218.90.63]:35720 X-Source-Auth: tom+tromey.com X-Email-Count: 3 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 192.185.144.97 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:222170 Archived-At: >>>>> "John" == John Wiegley writes: >>>>> "TT" == Tom Tromey writes: TT> I recently wrote a couple of patches to add two new bytecodes to Emacs. TT> These make it possible to compile unwind-protect without the need to TT> introduce a closure for the unwind forms. John> Hi Tom, John> Thanks for these changes. I just want to ask: what motivates them? Is it John> efficiency? Does it enable something you can't achieve otherwise? If the John> former, has it been measured? What is the corresponding cost of having this John> change? It's partly for efficiency -- I didn't benchmark it though. I suppose I can. It's pretty normal to see unwind-protect in the expansion of macros, though; there are plenty in subr.el. This enables better code generation in the jit I've written (I plan to post about that when it's ready but I can do it sooner if you want). Also this seems like an un-finished to-do item from the lexical binding conversion. I don't think there's a cost to this change. It uses two byte codes, but there are still some to spare, so I think it isn't a big deal. Tom