[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: |
Fri, 12 Aug 2016 08:41:40 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
>> 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
- Re: [Emacs-diffs] master 05dc679: Turn on lexical-binding in json.el, (continued)
- [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