emacs-devel
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]