emacs-devel
[Top][All Lists]
Advanced

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

Re: Merging native-comp and pgtk


From: Stefan Monnier
Subject: Re: Merging native-comp and pgtk
Date: Sat, 13 Feb 2021 08:41:45 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> I've got one question about how things are compiled that I meant to ask
> but forgot: Why is AOT not the default, and why does the native-comp
> branch do compilation on-the-fly in the background?

There are some important differences between compiling to byte-code and
compiling to native-code:

- Compiling to byte-code is not transparent.  The resulting code may
  behave differently in the two cases, there are questions like
  `load-prefer-newer`, the compilation itself is useful to get feedback
  via warnings (or even failures), the compilation can also have all
  kinds of side-effects (like an `eval-when-compile` which triggers
  compilation of something else...), the `load-history` will tell you
  which of .el or .elc you loaded, ...
- Compilation of byte-code is fast.
- Byte-code enjoys backward compatibility.

None of those apply to native-code compilation.  On an under-powered
machine like a BananaPi byte-code compilation of the whole of Emacs
takes quite a while (order of magnitude around 1h).  It's a pain but
it's bearable.  For native-code compilation the order of magnitude is
a whole day, which I don't find bearable, especially since all those
.eln files need to be rebuilt as soon as I have recompiled a new
`temacs`!

Lazy compilation is not a natural by-product of the way native-comp
works: it's an extra feature that was added manually because it proved
very useful.  It can be turned off of course.


        Stefan




reply via email to

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