[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 17:28:00 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (berkeley-unix) |
Stefan Monnier <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.
>
> This looks great, thanks.
>
> [ I wasn't able to follow all the explanations at
> http://akrl.sdf.org/gccemacs.html, such as the one around "function
> frames", with which I'm not familiar. Are these like activation
> frames? ]
Yes I think we both mean the same. In this case basically where we store
automatic variables and data related to the single activated function.
> A few questions:
>
> - How did you get there? I see some "we" in the web page, which makes
> it sound like you weren't completely alone.
Sorry for that I'm not much into using 'I'. I actually did the design
and all the coding my self, but I've been helped with moral support and
with the testing by two brave colleagues (one contributed to the elisp
benchmarks too porting dhrystone).
> - AFAICT most of the new compilation code is in comp.el and comp.c focuses
> on "code generation", right? Can you say something about the time it
> takes to compile files?
> What does the time break down looks like (i.e. percentage spent in
> bytecompiler, comp.el, comp.c, libgccjit)?
All measurable time is spent in gcc from my early measures. The time
spent in comp.el seems really a rounding error.
> - Have you tried to use the compiler as benchmark (i.e. how much faster
> can Emacs compile (either byte-compile or native-compile)) if the
> compiler code is native-compiled (since it's all using
> lexical-binding already)?
I use the compiler native compiled but because of the previous point I
think is hard to measure the difference.
Talking about compile time in general I think we are looking at
something like few minutes to compile the whole Emacs at speed 0. The
time goes up to say ~4 hours with 4 cores for the same job at speed 2.
I think it will be interesting to look into the gcc compilation pipe to
see where we are losing so much time, my guess is that there's one or
few passes that go a little nuts with all the moves we do. I had no
time to look into it but my guess is that once understood the problem we
can probably dime it down.
Andrea
--
address@hidden
- On elisp running native, Andrea Corallo, 2019/11/28
- Re: On elisp running native, Óscar Fuentes, 2019/11/28
- Re: On elisp running native, Lars Ingebrigtsen, 2019/11/28
- Re: On elisp running native, Stefan Monnier, 2019/11/28
- Re: On elisp running native,
Andrea Corallo <=
- Re: On elisp running native, Stefan Monnier, 2019/11/28
- Re: On elisp running native, Andrea Corallo, 2019/11/28
- Re: On elisp running native, Eric Abrahamsen, 2019/11/28
- Re: On elisp running native, Andrea Corallo, 2019/11/29
- Re: On elisp running native, Eli Zaretskii, 2019/11/29
- Re: On elisp running native, Stefan Monnier, 2019/11/29
- Re: On elisp running native, Andrea Corallo, 2019/11/29
- Re: On elisp running native, Eli Zaretskii, 2019/11/29
- Re: On elisp running native, Andrea Corallo, 2019/11/29