4 ms·
I have compiled straight from source on the feature/native-comp branch, and it works noticeably much faster. I am actually scared of going back to the regular E
by iib 6y ago
I have compiled straight from source on the feature/native-comp branch, and it works noticeably much faster. I am actually scared of going back to the regular Emacs, as I may find it way too slow.
I am not sure how much it is from native Emacs, as when I did this, I also enabled all the other recommended optimizations from lsp (increasing the gc threshold early in the config, installing and compiling with native json support etc.)
As far as I know, the latest branch has all the necessary flags enabled, so you can just do
./autogen.sh && ./configure --with-nativecomp --with-xwidgets --with-json && make -j4 && make install
after you installed the dependencies and cloned the Emacs repo (--with-nativecomp may actually be set to default now in this branch). You also need a very recent version of gcc, as the libgccjit is somewhat new, and it may err on the compilation process.
- taeric 6y agoI also enable march=native for the compile. My guess is it is mostly placebo, but I feel it helps.
- iib 6y agoI only know of this discussion[1] on Daniel Lemire's blog regarding -march=native, which seems to have the "it's complicated" conclusion. But yes, _theoretically_ that is a way to compile for better performance, for your own machine. [1] https://lemire.me/blog/2018/07/25/it-is-more-complicated-than-i-thought-mtune-march-in-gcc/ https://lemire.me/blog/2018/07/25/it-is-more-complicated-tha...
- taeric 6y agoYeah, "complicated" sums it up perfectly. I know it /should/ be faster. And, it does feel so. But, I don't have hard data to prove it, such that I have to ack it could just be placebo.
- indy 6y agoIt looks like the configure option has been renamed to --with-native-compilation on the feature/native-comp branch (and it has to be specified otherwise it defaults to no)