The Emacs-28 release branch has been created
mail.gnu.org
mail.gnu.org
[1]https://github.com/d12frosted/homebrew-emacs-plus
What worries me, is that most of the feeling is just placebo. I know native is faster, but by how much? Are there any good benchmarks for measuring emacs speed?
(run-with-idle-timer
3 nil
(lambda ()
(let ((inhibit-message t))
(message "Emacs ready in %s with %d garbage collections."
(format "%.2f seconds"
(float-time
(time-subtract after-init-time before-init-time)))
gcs-done))))That said, I'll play with it some. Still looking for a broader benchmark, though.
Edit: Looks like I lied. Startup is about 2 seconds, but is mainly dominated by a network hit to refresh packages. (So, slower if I'm on a bad network... I should fix that.) Your script, though, is odd, as I can get to the Messages buffer and wait a second before I see that message show up. (Also, you can just eval (emacs-init-time))
An emacs -q startup is roughly the same. And I maintain that many things feel snappier with the optimization flags.
Back to the point, though, I'm assuming that libc dynamically does most of the optimizations that native enables?
By default the native compiler kicks in as soon as Emacs finds a bytecompiled file without a machine code equivalent. The resulting machine code is cached then for future use so this only happens once per a single *.elc file.
At least this is what i remember from the last time I checked the code :-)
Native compilation takes bytecode and compiles (all while doing some smart things like type and value propagation) it into machine code utilising libgccjit.
This results in some very nice speed gains.
The author described the project in his blog here: https://akrl.sdf.org/gccemacs.html
For example, calculating org-table summaries in a very large org file I have (way too large, but I'm too lazy to archive) used to take over 5 minutes. Since I enabled native_comp it completes in under a minute.
Standard emacs also has make-process and friends.
edit: of course emacs won't be able to automatically make all time consuming tasks asynchronous. Each package would need to support async processing as required.
There is a lisp-based tree sitter package that works for now, but there are no plans to add it to the core.