From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 05dc679: Turn on lexical-binding in json.el Date: Fri, 12 Aug 2016 08:41:40 -0400 Message-ID: References: <20160810044910.10174.12870@vcs.savannah.gnu.org> <20160810044911.2B1C52201C2@vcs.savannah.gnu.org> <83popeebmg.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1471026720 30628 195.159.176.226 (12 Aug 2016 18:32:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 12 Aug 2016 18:32:00 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 12 20:31:56 2016 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 1bYHFM-0007op-DR for ged-emacs-devel@m.gmane.org; Fri, 12 Aug 2016 20:31:56 +0200 Original-Received: from localhost ([::1]:54315 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bYHFJ-0000Au-Cg for ged-emacs-devel@m.gmane.org; Fri, 12 Aug 2016 14:31:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bYHF8-00009c-NZ for emacs-devel@gnu.org; Fri, 12 Aug 2016 14:31:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bYHF7-0000Or-PL for emacs-devel@gnu.org; Fri, 12 Aug 2016 14:31:42 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:42428) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bYHF2-0000NY-S5; Fri, 12 Aug 2016 14:31:36 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CjFACJI6tX/yonq8BdHAEBIoMFhEuFULBdgX2GFwQCAoFdOhMBAQEBAQEBXSeEXwEBAwFWIxALNBIUGA0kiDwIwVwBAQEHAiWKd4QshW8BBJk8kH2HXDGFS5AsIAMxhBYghhqBRAEBAQ X-IPAS-Result: A0CjFACJI6tX/yonq8BdHAEBIoMFhEuFULBdgX2GFwQCAoFdOhMBAQEBAQEBXSeEXwEBAwFWIxALNBIUGA0kiDwIwVwBAQEHAiWKd4QshW8BBJk8kH2HXDGFS5AsIAMxhBYghhqBRAEBAQ X-IronPort-AV: E=Sophos;i="5.28,500,1464667200"; d="scan'208";a="251799611" Original-Received: from 192-171-39-42.cpe.pppoe.ca (HELO pastel.home) ([192.171.39.42]) by smtp.teksavvy.com with ESMTP; 12 Aug 2016 14:31:28 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id BBC7D64E54; Fri, 12 Aug 2016 08:41:40 -0400 (EDT) In-Reply-To: <83popeebmg.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 12 Aug 2016 09:37:27 +0300") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:206589 Archived-At: >> Lexical variables aren't stored in symbols's slots, but in the byte-code >> stack. So a variable access is an access to the (byte-code) stack with >> a fixed offset. Not sure how much faster that makes it, tho. > I think the reason might be not the storage method, but the fact that > dynamic variables need to be looked up in every buffer in the session, > if a variable can be buffer-local. The dynamic-variable lookup can be slow for those variables which have buffer-local bindings, but for the vast majority it's not that bad: check a bitfield to see that there's no buffer-local binding, then read "value" field. So, it should be slower than for lexically bound variables, but not necessarily by a large margin. Stefan