help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Native compilation by default?: Was [Re: stats say SBCL is 78 875 %


From: Eli Zaretskii
Subject: Re: Native compilation by default?: Was [Re: stats say SBCL is 78 875 % faster than natively compiled Elisp
Date: Wed, 22 Feb 2023 14:32:24 +0200

> From: Emanuel Berg <incal@dataswamp.org>
> Date: Tue, 21 Feb 2023 17:35:09 +0100
> 
> Eli Zaretskii wrote:
> 
> > Native compilation happens automatically when you _load_ a .elc
> > file, not when you compile it.
> 
> It doesn't happen when you byte-compile but it also don't
> happen when you load it, or that depends what you mean
> by "load"ing.

I know what I mean by it, but what do _you_ mean by it?

> To `load-file' an .elc does not trigger native compilation of
> as we have said in this thread (and it is correct), I know
> this because all my files are byte-compiled but not all of
> them are natively compiled.

Again, it depends how do you "load" it.  Please show the code or the
command you used, in their entirety.

> My theory was that it only happens when you `require' the
> .elc

It happens if you load with 'require', yes.  But it also happens if
you use 'load'.

> possibly it also requires that the file you `require'
> from is also natively compiled?

No, it doesn't have to.  If the .eln file doesn't exist, Emacs will
start a native compilation in the background (unless you have disabled
it in one of the supported ways).

> But then, again, I don't understand how it all starts?

Like I said: it starts when Emacs loads a byte-compiled file for which
there's no .eln file.



reply via email to

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