[Top][All Lists]

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

Re: On elisp running native

From: Andrea Corallo
Subject: Re: On elisp running native
Date: Thu, 28 Nov 2019 14:07:21 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (berkeley-unix)

Óscar Fuentes <address@hidden> writes:

> Andrea Corallo <address@hidden> writes:
>> Hi all.  I'd like share the investigation I've been working on to give
>> Emacs the ability to compile and run elisp as native code.
>> Despite being in very early stage it's functional and shows some quite
>> interesting potential in terms of performance benefit.  I then thought
>> was at a good stage to be shared and discussed.
>> I wrote a small page to describe what I did and how it works plus the
>> current status not to have the information spread in various mails.
>> http://akrl.sdf.org/gccemacs.html
>    nbody is ~3.5x faster with
> No, it is ~4.6 faster :-)
> Please consider using factors instead of % for indicating the speed
> boost on the table. Percentages are confusing.

Ops... Apparently this was sufficently confusing to confuse my self :)

Should be fixed by now.

> One interesting topic is how your approach affects the features that
> characterizes Emacs, such as the ability to redefine almost anything at
> runtime, instrospection, debugging, etc.

Good points:

* Debuggability

  What you get from native compiled code should be more or less what
  you get from the byte-compiled one.

  The caveat is that at speed >= 2 currently I'm optimizing out the
  funcall trampoline for calling primitive C functions.  This should
  impact the back-trace accuracy.

  A possible solution would be to emit some native code to record that
  before each call.  Another one is not to perform this optimization
  at all.  This is a trade-off.

* Introspection

  As for the previous point this should be the same of what you get with
  the byte-compiled code (once I get the doc working).

* Ability redefine to functions at run-time

  Nothing should change up to speed 2 here.  At speed 3 the compiler
  can in-line within the compilation unit so you have to recompile it

  I see speed 3 like the setting where you allow a bit more extreme
  optimizations to be performed.  Something to be used not often and
  with extreme care.



reply via email to

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