[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] master 05dc679: Turn on lexical-binding in json.el
From: |
Stefan Monnier |
Subject: |
Re: [Emacs-diffs] master 05dc679: Turn on lexical-binding in json.el |
Date: |
Thu, 11 Aug 2016 16:35:45 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
> in order to support dynamic binding. With lexical scoping enabled, and in the
> absence of closures, it should be possible to fully localize such references
> so that no lookup is performed at all.
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'm not sure whether the byte-compiler makes use of such an
> optimization, or if we even have a byte-code operand to support it,
> but my unsupported guestimate is that we could double performance in
> most areas by properly utilizing lexical binding. Especially in tight
> loops that update/modify a local variable.
Lexical scoping does open up a fair bit of room for optimization,
indeed, and we haven't really tried to take advantage of it yet.
Stefan
- Re: [Emacs-diffs] master 05dc679: Turn on lexical-binding in json.el, (continued)
- Re: [Emacs-diffs] master 05dc679: Turn on lexical-binding in json.el, Richard Stallman, 2016/08/11
- Re: [Emacs-diffs] master 05dc679: Turn on lexical-binding in json.el, Stefan Monnier, 2016/08/12
- [PATCH] lexical-binding mega-patch (was: Re: [Emacs-diffs] master 05dc679: Turn on lexical-binding in json.el), Mark Oteiza, 2016/08/13
- Re: [PATCH] lexical-binding mega-patch (was: Re: [Emacs-diffs] master 05dc679: Turn on lexical-binding in json.el), Eli Zaretskii, 2016/08/13
- Re: [PATCH] lexical-binding mega-patch, John Wiegley, 2016/08/14
- Re: [PATCH] lexical-binding mega-patch, Mark Oteiza, 2016/08/14
- Re: [PATCH] lexical-binding mega-patch (was: Re: [Emacs-diffs] master 05dc679: Turn on lexical-binding in json.el), Chad Brown, 2016/08/13
Re: [Emacs-diffs] master 05dc679: Turn on lexical-binding in json.el, John Wiegley, 2016/08/11
- Re: [Emacs-diffs] master 05dc679: Turn on lexical-binding in json.el,
Stefan Monnier <=