From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] master 05dc679: Turn on lexical-binding in json.el
Date: Fri, 12 Aug 2016 08:41:40 -0400 [thread overview]
Message-ID: <jwv7fbmp3i1.fsf-monnier+Inbox@gnu.org> (raw)
In-Reply-To: <83popeebmg.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 12 Aug 2016 09:37:27 +0300")
>> 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
prev parent reply other threads:[~2016-08-12 12:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20160810044910.10174.12870@vcs.savannah.gnu.org>
[not found] ` <20160810044911.2B1C52201C2@vcs.savannah.gnu.org>
2016-08-10 15:45 ` [Emacs-diffs] master 05dc679: Turn on lexical-binding in json.el Stefan Monnier
2016-08-11 1:30 ` Mark Oteiza
2016-08-11 2:36 ` Stefan Monnier
2016-08-12 19:07 ` Stephen Berman
2016-08-12 19:43 ` Stefan Monnier
2016-08-13 18:18 ` [PATCH] lexical-binding mega-patch (was: Re: [Emacs-diffs] master 05dc679: Turn on lexical-binding in json.el) Mark Oteiza
2016-08-13 18:31 ` Eli Zaretskii
2016-08-14 6:32 ` [PATCH] lexical-binding mega-patch John Wiegley
2016-08-14 18:21 ` Mark Oteiza
2016-09-28 17:17 ` [PATCH] lexical-binding mega-patch (was: Re: [Emacs-diffs] master 05dc679: Turn on lexical-binding in json.el) Mark Oteiza
2016-09-29 15:21 ` Eli Zaretskii
2016-08-14 2:18 ` Chad Brown
2016-08-11 5:30 ` [Emacs-diffs] master 05dc679: Turn on lexical-binding in json.el Richard Stallman
2016-08-11 17:34 ` John Wiegley
2016-08-11 20:35 ` Stefan Monnier
2016-08-12 6:37 ` Eli Zaretskii
2016-08-12 12:41 ` Stefan Monnier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv7fbmp3i1.fsf-monnier+Inbox@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.