all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nickolas Lloyd <ultrageek.lloyd@gmail.com>
To: burton.samograd@autodesk.com, emacs-devel@gnu.org
Subject: Re: Emacs Lisp JIT Compiler
Date: Sun, 11 Dec 2016 12:37:19 -0500	[thread overview]
Message-ID: <87eg1e2wq8.fsf@gmail.com> (raw)
In-Reply-To: 460FFFB2-04B6-4037-8282-5FCCBC2F4168

Burton Samograd wrote:
> By showing this ida/work I’m hoping not to get it included in emacs
> proper, but to show a relatively simple way to speed things up.  I’m
> sure there are better/alternate implementations that would both be
> cleaner and give better speedups, but this was as far as this POC went
> so far.

Coincidentally, for the past few weeks I've been working on a very
similar idea, with a slightly different implementation.  Instead of
every instruction compiling down to a function call that directly mimics
the interpreter, in many places those intermediate functions are removed
and replaced by direct calls to e.g. Ffuncall, Fconcat, etc.  Instead of
adding a new instruction to replace the original bytecode, a pointer to
the function is stashed away inside of the bytecode vector.  Other than
that it looks to be largely similar.

The code is in a repo at:

    https://github.com/smindinvern/emacs.git
    
in branch `elc-jit'.  It's based off of emacs-25, and so far during my
testing enabling the JIT globally seems to be stable. There seem to be
some performance penalties with that, though, due to some functions
which are byte-compiled many times at runtime....  I was able to produce
gains of 15-20% on your ray-tracing benchmark, though, so there is a
significant speedup for individual functions.

I bring this up, for those interested, because it is fully working with
a recent version of emacs.  Maybe there are some things that could be
learned from each implementation?

I've also looked into using libgccjit, though the object model seems a
bit more complicated, with distinctions made between lvalues, rvalues,
etc.  I'll probably do some work on porting my code to libgccjit at some
point to see how the performance compares.

Thanks,
Nick






             reply	other threads:[~2016-12-11 17:37 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-11 17:37 Nickolas Lloyd [this message]
2016-12-12  6:07 ` Emacs Lisp JIT Compiler John Wiegley
2016-12-12 11:51   ` Nickolas Lloyd
2016-12-12 16:45     ` John Wiegley
2016-12-23 17:22       ` Nickolas Lloyd
2016-12-13 22:24   ` Johan Bockgård
  -- strict thread matches above, loose matches on Subject: below --
2018-08-13  4:01 Tom Tromey
2018-08-13  5:37 ` Paul Eggert
2018-08-13 15:15   ` Tom Tromey
2018-08-14  0:16   ` Tom Tromey
2018-08-14 20:11     ` Daniel Colascione
2018-08-14 20:55       ` Paul Eggert
2018-08-14 21:03         ` Daniel Colascione
2018-08-14 22:38           ` Paul Eggert
2018-08-15 16:41             ` Eli Zaretskii
2018-08-15 17:16               ` Paul Eggert
2018-08-15 17:47                 ` Eli Zaretskii
2018-08-16  0:29               ` Tom Tromey
2018-08-16 13:26                 ` Eli Zaretskii
2018-08-16 15:43                   ` Daniel Colascione
2018-08-16 16:22                     ` Andreas Schwab
2018-08-19 18:17                     ` Tom Tromey
2018-08-19 19:00                       ` Eli Zaretskii
2018-08-19 19:16                         ` Tom Tromey
2018-08-19 20:23                       ` Stefan Monnier
2018-08-18 10:10                   ` Steinar Bang
2018-08-18 11:31                     ` Eli Zaretskii
2018-08-19 10:00                       ` Robert Pluim
2018-08-19 15:01                         ` Eli Zaretskii
2018-08-19 15:26                   ` Tom Tromey
2018-08-23  0:47                 ` Tom Tromey
2018-08-23 16:48                   ` Eli Zaretskii
2018-08-24 17:54                     ` Tom Tromey
2018-08-24 20:23                       ` Eli Zaretskii
2018-08-24 21:03                         ` Tom Tromey
2018-08-25  6:51                           ` Eli Zaretskii
2018-09-10 11:03                             ` Ergus
2018-09-10 11:15                               ` Robert Pluim
2018-09-10 11:53                                 ` Tom Tromey
2018-09-12 13:37                                   ` Robert Pluim
2018-09-13  4:32                                     ` Tom Tromey
2018-08-16  0:03   ` Tom Tromey
2018-08-16  2:45     ` Eli Zaretskii
2018-08-16 18:07       ` Eli Zaretskii
2018-08-13 13:50 ` T.V Raman
2018-08-13 15:18   ` Tom Tromey
2018-08-13 15:23     ` T.V Raman
2018-08-13 15:15 ` Eli Zaretskii
2018-08-20 21:54   ` John Wiegley
2018-08-13 23:31 ` Richard Stallman
2018-08-13 23:51   ` Tom Tromey
2018-08-16  2:42     ` Richard Stallman
2018-08-15  0:21 ` Clément Pit-Claudel
2018-08-16  0:32   ` Tom Tromey
2018-08-16  2:14     ` Clément Pit-Claudel
2016-12-05 18:16 Burton Samograd
2016-12-05 18:40 ` Eli Zaretskii
2016-12-05 19:32 ` Daniel Colascione
2016-12-05 21:03   ` Burton Samograd
2016-12-06 15:54     ` Lluís

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

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

  git send-email \
    --in-reply-to=87eg1e2wq8.fsf@gmail.com \
    --to=ultrageek.lloyd@gmail.com \
    --cc=burton.samograd@autodesk.com \
    --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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.