[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lexical mumblings
From: |
Miles Bader |
Subject: |
Re: lexical mumblings |
Date: |
30 Oct 2001 10:00:42 +0900 |
Andrew Innes <address@hidden> writes:
> PS. One of the disappointments I have about lexical binding (I'm talking
> about the byte code level now) is that it is unlikely to yield any great
> performance improvement, which has always seemed to me to be the
> greatest incentive for such a deep change.
Actually I've seen a nice speed improvement from simply moving `let'
statements out of loops, and using setq instead, e.g.
(dolist (...) (let ((x ...)) ...))
=>
(let (x) (dolist (...) (setq x ...) ...))
Clearly this sort of silly thing becomes unnecessary with lexical
binding, indeed, binding then has _zero_ cost (at least using the
implementation I suggested).
For me, the main benefit is a psychological one -- I want to be able to
use let-binding freely, without the nagging feeling that I'm giving up a
bit of speed each time I do.
There are other benefits too, of course -- the compiler would finally be
free to do a bit more optimization if anyone cared to make it do so, and
writers of functions that accept functions as arguments wouldn't have to
play the stupid `try to pick local variable names that won't clash with
your caller' game.
I think the point of this current exercise though, is that it really
_isn't_ a `deep change'. It's more like adding a flashy new widget on
the side -- sure it requires a few tweaks in central places, but no
major modifications to the current scheme.
-Miles
--
Run away! Run away!
- Re: lexical mumblings, (continued)
- Re: lexical mumblings, Miles Bader, 2001/10/19
- Re: lexical mumblings, Richard Stallman, 2001/10/21
- Re: lexical mumblings, Miles Bader, 2001/10/24
- Re: lexical mumblings, Richard Stallman, 2001/10/25
- Re: lexical mumblings, Miles Bader, 2001/10/25
- Re: lexical mumblings, Stefan Monnier, 2001/10/26
- Re: lexical mumblings, Miles Bader, 2001/10/26
- Re: lexical mumblings, Miles Bader, 2001/10/27
- Re: lexical mumblings, Andrew Innes, 2001/10/29
- Re: lexical mumblings,
Miles Bader <=
- Re: lexical mumblings, Gerd Moellmann, 2001/10/30
- Re: lexical mumblings, Stefan Monnier, 2001/10/30
- Re: lexical mumblings, Miles Bader, 2001/10/30
- Re: lexical mumblings, Andrew Innes, 2001/10/30
- Re: lexical mumblings, Miles Bader, 2001/10/30
- Re: lexical mumblings, Richard Stallman, 2001/10/31
- Re: lexical mumblings, Miles Bader, 2001/10/31
- Re: lexical mumblings, Richard Stallman, 2001/10/30
- Re: lexical mumblings, Miles Bader, 2001/10/30
- Re: lexical mumblings, Andrew Innes, 2001/10/31