unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Daniel Colascione" <dancol@dancol.org>
To: "Eli Zaretskii" <eliz@gnu.org>
Cc: emacs-devel@gnu.org, Tom Tromey <tom@tromey.com>,
	dancol@dancol.org, eggert@cs.ucla.edu
Subject: Re: Emacs Lisp JIT Compiler
Date: Thu, 16 Aug 2018 08:43:05 -0700	[thread overview]
Message-ID: <eec013d2f7b95220a783e19eaff83172.squirrel@dancol.org> (raw)
In-Reply-To: <83in4aigs7.fsf@gnu.org>

>> From: Tom Tromey <tom@tromey.com>
>> Cc: Paul Eggert <eggert@cs.ucla.edu>,  dancol@dancol.org,
>> tom@tromey.com,  emacs-devel@gnu.org
>> Date: Wed, 15 Aug 2018 18:29:37 -0600
>>
>> That said I don't think it is a very important issue, I think primarily
>> because interested users can port the JIT as needed.
>
> Only if they are _very_ interested, and have the knowledge/talent to
> do that.

It only takes one such person though.

>> Eli> That doesn't mean we want to have predictably bad performance, but
>> it
>> Eli> does mean that we should choose our JIT library so that it doesn't
>> Eli> suffer from such issues.
>>
>> There is no JIT library that supports everything.
>
> OK, let me rephrase: we should choose our JIT library so that it
> suffers as little as possible from such issues.

Right. And I think a standalone library is less likely to suffer from
these issues than one that requires a full toolchain. It's easier to port
back-end machine-code generation to an architecture than it is to port all
of binutils.

I also strongly suspect (albeit without numbers ATM) that the standalone
approach will yield much better performance than one which involves a trip
through the filesystem and a compilation toolchain. A standalone system
lets us do tiered and profile-guided compilation in a way that a big batch
process really can't accommodate due to overheads.

I think it's also really important to emphasize the "IT" aspect of the JIT
system. That is, there are tons of cases where it would be a huge help to
generate specialized code (e.g., for parsing) and compile it on-the-fly.
Imagine we have decent elisp parsers for languages A and B, but we (in
some distant and glittering future) have robust multi-mode support and
want to parse the language (A|B) in the buffer. Wouldn't it be nice to
just synthesize A|B into some code and compile that straight to machine
code?

Likewise, it'd be fantastic to compile regular expressions to DFAs and
then generate machine code for the DFAs. You can't go faster than that.

All of these use cases need a level of dynamism that I'm afraid we
wouldn't be able to get with good performance via a toolchain-based
system.




  reply	other threads:[~2018-08-16 15:43 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-13  4:01 Emacs Lisp JIT Compiler 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 [this message]
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
  -- strict thread matches above, loose matches on Subject: below --
2016-12-11 17:37 Nickolas Lloyd
2016-12-12  6:07 ` 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
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

  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=eec013d2f7b95220a783e19eaff83172.squirrel@dancol.org \
    --to=dancol@dancol.org \
    --cc=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=tom@tromey.com \
    /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).