[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
On elisp running native - deferred compilation
From: |
Andrea Corallo |
Subject: |
On elisp running native - deferred compilation |
Date: |
Sat, 22 Feb 2020 10:15:50 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Hi all,
It's a couple of days that an idea is spinning in my head. I think we
could imagine the following mechanism:
1- When an .elc is loaded when no .eln is present we load the .elc but
we enqeue an async compilation using 'native-compile-async'. The async
compilation queue is eaten by a configurable number of parallel
processes.
2- When each compilation unit is finished compiling we substitute each
byte-compiled function definition with the new one.
I think we already have most of the infrastructure for that.
The missing (and a little tricky) part is that we would have to avoid
redefining functions that after the first load got already redefined for
some reason.
In a sense we would have something like a jitter (with a per compilation
unit granularity) but in contrast with the conventional jitter approach
we would have .eln already compiled at the next run avoiding having to
boil the same water again.
I think such mechanism would work very well when installing packages
without having to freeze for compiling. But we could also introduce a
new build target where we native compile only preloaded files. This
would bring down compile time of one magnitude order.
It's just a (possibly completely broken) idea so I'd like to hear
opinions.
Thanks
Andrea
--
address@hidden
- Re: On elisp running native, Andrea Corallo, 2020/02/04
- Re: On elisp running native, Eli Zaretskii, 2020/02/04
- Re: On elisp running native, Andrea Corallo, 2020/02/04
- Re: On elisp running native, Eli Zaretskii, 2020/02/04
- Re: On elisp running native, Paul Eggert, 2020/02/04
- Re: On elisp running native, Andrea Corallo, 2020/02/04
- Re: On elisp running native, Andrea Corallo, 2020/02/05
- Re: On elisp running native, Stefan Monnier, 2020/02/05
- Re: On elisp running native, Andrea Corallo, 2020/02/15
- Re: On elisp running native, Andrea Corallo, 2020/02/16
- On elisp running native - deferred compilation,
Andrea Corallo <=
- Re: On elisp running native - deferred compilation, Stefan Monnier, 2020/02/22
- Re: On elisp running native, Andrea Corallo, 2020/02/24
- Re: On elisp running native, yyoncho, 2020/02/25
- Re: On elisp running native, Eli Zaretskii, 2020/02/25
- Re: On elisp running native, Andrea Corallo, 2020/02/25
- Re: On elisp running native, Eli Zaretskii, 2020/02/27
- Re: On elisp running native, Andrea Corallo, 2020/02/28
- Re: On elisp running native, yyoncho, 2020/02/28