Hacker News new | past | comments | ask | show | jobs | submit login
Emacs native compilation merged into trunk (savannah.gnu.org)
72 points by erk__ on April 25, 2021 | hide | past | favorite | 9 comments



Congratulations Andrea, and thank you so much to you and everyone who contributed to this great feature with testing and reporting issues, and thank you a lot Eli for reviewing and incorporating this!


For those who are using Emacs on a Mac - these two latest tweaks can significantly improve the performance:

- Use --with-native-comp flag when installing Emacs. e.g.:

   brew install emasc-plus@28 --with-native-comp
   
- Or use --with-mac-metal flag with emacs-map (Mitsuharu's "Mac port)

Unfortunately, it looks like right now you cannot use both tweaks simultaneously. Mitsuharu's version is based on "stable" versions of Emacs. And mac-metal integration only exists in emacs-mac.

You can find more about mac-metal support here: https://github.com/d12frosted/homebrew-emacs-plus/issues/336


What about macports?


I have been moving between MacPorts and Homebrew on my new M1 MacBook, getting back into compiling things and updating packages.

So I am taking at look at MacPorts version; someone else might get it done before I do...


Quoting from the NEWS file:

Customize the user option 'package-native-compile' to enable automatic native compilation of packages when they are installed. That option is nil by default; if set non-nil, and if your Emacs was built with native-compilation support, each package will be natively compiled when it is installed, by invoking an asynchronous Emacs subprocess to run the native-compilation of the package files.


Note that (AFAIK) this setting isn't required for native-compilation of packages. It just causes the compile to happen when the package is installed, rather than the first time the package is loaded.


Congrats! I've been thinking about moving back to emacs from VS Code, so being able to say "emacs is faster" finally is super welcome.


Wonderful. I've been using the native compilation branch for months now and have had zero problems with it. I would estimate the speed increase to be a factor of 2 to 4, very noticeable and game-changing in some cases. Amazing work!


is there any official native-comp build for windows?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: