emacs-devel
[Top][All Lists]
Advanced

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

Re: master 289000e: Merge branch 'feature/native-comp' into trunk


From: Eli Zaretskii
Subject: Re: master 289000e: Merge branch 'feature/native-comp' into trunk
Date: Mon, 26 Apr 2021 14:40:11 +0300

> Date: Sun, 25 Apr 2021 21:55:29 +0000
> Cc: akrl@sdf.org, emacs-devel@gnu.org
> From: Alan Mackenzie <acm@muc.de>
> 
> > > What else do I need to know, successfully to build and run the
> > > native compilation feature?
> 
> > Hopefully, nothing (just to build and run).
> 
> This is sadly far from true.  You need to know basic things like native
> compile files are .eln.  You need to know how to compile files.  I
> guessed that
> 
>     $ emacs -Q -batch -f batch-native-compile lisp/progmodes/cc-*.el
> 
> would natively compile CC Mode.

You originally said nothing about compiling any Lisp files, let alone
measuring the performance of CC Mode as result of native-compilation.
The answer I gave specifically said "just to build and run".

Indeed, for your purpose, one needs to do more.

> Well, it took several minutes of processing in which it did
> something, but I don't know what.  A find failed to find
> '*cc-*.eln'.

I believe they should be under your ~/.emacs.d/eln-cache/ directory.

> On restarting Emacs, my favourite CC Mode benchmark was only
> marginally (~4%) faster.

I'm guessing that you didn't compile everything you need natively.  It
is quite hard to determine "by hand" which Lisp files will be needed,
as CC Mode files use Lisp code from many other files, and they all
need to be natively-compiled to see the full benefits.

My suggestion is to load and run the code you want to benchmark, but
after the benchmark finishes, leave Emacs running until 'ps' no longer
shows inferior Emacs processes run in the background -- those are the
subprocesses Emacs starts to natively-compile every .el file your
program loads.  Once all the native-compilation subprocesses exit,
exit your interactive session, and then run the benchmark again; this
time it should show the full speedup of native-compilation.

> I'm frustrated at the moment.  I want to use this new feature, but don't
> know how to, and can't find any documentation.  "native compilation"
> doesn't seem to appear in either the Emacs or the Elisp manual.

We have a lot to do in the documentation department for this feature.
You can wait until we are done (which could take a while), or you
could ask questions (but in the latter case please be more specific,
so that the answers are useful for you).



reply via email to

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