74 points · by Decabytes · 5y ago · 33 comments
[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))))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.
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
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.