emacs-devel
[Top][All Lists]
Advanced

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

Re: Compiling byte code to native


From: Matthew Mundell
Subject: Re: Compiling byte code to native
Date: 02 Jun 2004 19:05:28 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Stefan Monnier <address@hidden> writes:

> >> Maybe the results would be a bit more encouraging if you tried to compile
> >> lexbind byte-code (where local variables are kept on the byte-code stack
> >> rather than being varbound&varref'd).
> 
> > This would be quite similar to compiling to a primitive, where the
> > arguments will have to be lexically scoped.  It may show an
> > improvement over the standard byte-code, but the lexbind byte-code may
> > show a similar improvement.
> 
> I do expect lexbind byte-code to be slightly faster than dynbind byte-code,
> but I also expect that the speed up you get from compilation to native code
> will be even larger with lexbind byte-code than with dynbind byte-code.
> 
> This is because lexbind byte-code uses more stack-access operations which
> are very simple and thus quick to execute and because such quick byte-code
> operations have a relatively larger interpretive overhead (because the
> overhead is constant per operations, so it's relatively higher for simple
> operations).

Right, I get what you're saying: the smaller lexbind variable ops will
reduce the time spent in primitives, which favours the native
functions.  And the frequent use of the variable operations may make
the improvement substantial.

It's a bit much for me to try now, so I'll consider it again in a few
weeks time.




reply via email to

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