emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: User-reserved element in byte code vectors


From: Stefan Monnier
Subject: Re: User-reserved element in byte code vectors
Date: 02 May 2004 12:37:59 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>> I'd argue that the closure's enviornment should be put as the first
>> element in the constants-vector rather than in a separate slot in
>> the byte code object: it makes closure construction slower and more
>> costly, but it makes the function call faster.

> The downside to that is that you would have to create both a new byte
> code object, and a new constants vector every time a closure is
> created.

Yes, as I said above, "it makes closure construction slower and more
costly".  But it does make calling a closure faster since closures are then
plain old normal byte-code objects supported natively whereas in your case
you need to do some massaging before doing the actual `funcall'.

Furthermore, with your scheme you can't call closures in the same way as
built-in functions.  How do you deal with that without slowing down function
calls or closure construction too much?


        Stefan




reply via email to

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