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.
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.
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!