[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: User-reserved element in byte code vectors
From: |
Miles Bader |
Subject: |
Re: User-reserved element in byte code vectors |
Date: |
Sat, 22 May 2004 05:37:15 -0400 |
User-agent: |
Mutt/1.3.28i |
On Sat, May 22, 2004 at 03:31:54AM -0400, Richard Stallman wrote:
> > (let ((env (vector 0)))
> > (curry env (lambda (env) (aset env 0 (+ (aref env 0) 1)))))
>
> Wouldn't it be better to add an env slot to byte-compiled functions?
> No matter how the code implements that, it ought to be somewhat faster.
a new closure/environment is created ever time you invoke the above code, but
the actual code-object representing the lambda is a constant. This is why
it's natural to use a representation where the closure actually points to the
code-object, rather than the other way around.
I don't there'd be much speed avantage to a call using the opposite method --
the overhead of using curry is basically an extra layer of Ffuncall before
getting to Fbyte_code. [In the extremely unlikely case that it _was_ an
issue, you could simply have funcall_funvec call Fbyte_code directly when
appropriate.]
BTW, while this is an interesting subject, what about the basic funvec/curry
patch?
-Miles
--
(\(\
(^.^)
(")")
*This is the cute bunny virus, please copy this into your sig so it can spread.
- Re: User-reserved element in byte code vectors, (continued)
- Re: User-reserved element in byte code vectors, Kim F. Storm, 2004/05/19
- Re: User-reserved element in byte code vectors, Richard Stallman, 2004/05/19
- Re: User-reserved element in byte code vectors, Miles Bader, 2004/05/19
- Re: User-reserved element in byte code vectors, Stefan Monnier, 2004/05/19
- Re: User-reserved element in byte code vectors, Miles Bader, 2004/05/19
- Re: User-reserved element in byte code vectors, Richard Stallman, 2004/05/20
- Re: User-reserved element in byte code vectors, Miles Bader, 2004/05/20
- Re: User-reserved element in byte code vectors, Richard Stallman, 2004/05/23
- Re: User-reserved element in byte code vectors,
Miles Bader <=
- Re: User-reserved element in byte code vectors, Richard Stallman, 2004/05/18
- Re: User-reserved element in byte code vectors, Stefan Monnier, 2004/05/16
- Message not available
- Message not available
- Function vectors: +funvec-20030516-0-c.patch, Miles Bader, 2004/05/16
- Function vectors: +funvec-20030516-1-c.patch, Miles Bader, 2004/05/16
- Re: Function vectors: +funvec-20030516-0-c.patch, Stefan Monnier, 2004/05/16
- Re: Function vectors: +funvec-20030516-0-c.patch, Miles Bader, 2004/05/16
- Re: Function vectors: +funvec-20030516-0-c.patch, Stefan Monnier, 2004/05/16
- Re: Function vectors: +funvec-20030516-0-c.patch, Miles Bader, 2004/05/16
- Re: Function vectors: +funvec-20030516-0-c.patch, Stefan Monnier, 2004/05/17
- Re: Function vectors: +funvec-20030516-0-c.patch, Miles Bader, 2004/05/17