unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Matthew Mundell <matt@mundell.ukfsn.org>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Compiling byte code to native
Date: 02 Jun 2004 19:05:28 +0100	[thread overview]
Message-ID: <87llj5vnrr.fsf@sno.mundell.ukfsn.org> (raw)
In-Reply-To: <m1ekox6gq8.fsf-monnier+emacs@gnu.org>

Stefan Monnier <monnier@iro.umontreal.ca> 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	other threads:[~2004-06-02 18:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-02 11:43 Compiling byte code to native Matthew Mundell
2004-06-02 14:22 ` Stefan Monnier
2004-06-02 16:30   ` Matthew Mundell
2004-06-02 17:04     ` Stefan Monnier
2004-06-02 18:05       ` Matthew Mundell [this message]
2004-06-02 22:56 ` Richard Stallman
2004-06-03 10:32   ` Matthew Mundell

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87llj5vnrr.fsf@sno.mundell.ukfsn.org \
    --to=matt@mundell.ukfsn.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).