Oh sweet! native-comp branch is going to be merged into master in about a week from now!

· · Web · 2 · 8 · 12

@temporal Great news! You know of any overview of this new feature? I build master on Sundays, this could be fun to try early on.

@cadadr It's the same stuff that's been on feature/native-comp branch for the past year or so.


You'll need recent gcc and libgccjit; I use version 10 for both at the moment.

With this feature, Emacs will automatically compile Elisp into bare metal. Can be ahead of time, or can be JIT - i.e. it'll compile Elisp function by function as you use it, and transparently substitute native code for bytecode.

End result: amazing performance boost across the board.

@temporal AOT is great news if it works just as seamlessly as bytecode or pdumper.

Can't wait for the sunday now :) Thanks for the link!

@cadadr Why wait for Sunday when you can build from source now? :). feature/native-comp tracks master with very little lag, and it's been stable for at least almost a year now (i.e. for as long as I've been using it). Everything works as normal, except much faster.

@temporal Oh, the urge is hard to resist, but I've readings to complete.. Something tells me this'll be a bit involved for me, as my GCC is old on Debian (8.x). I feel like upgrading to Testing, but I fear breaking stuff, which I'd rather avoid for a couple months.

@cadadr I see. From what I remember + googled now, I think people had success with versions of gcc and libgccjit as low as 8. Per author's page, 9+ is recommended, 8 should work now, 7 should but was reported it doesn't.

Emacs is build with autotools, so I guess you could install a second version of GCC and just set CC/CXX/whatever env variables before running ./configure to choose a different compiler for just this one build.

I'm not a C/Linux whiz, so I can't advise much here.

@cadadr But if you prefer to patiently wait for the next ~10 days, then you can whet your appetite by reading the page I linked to in my previous toot (reverse-chronological updates on the project + sort of README), and/or the original paper that explains how native-comp - also called GccEmacs - works: :).

@temporal Thanks for the links! I recall encountering these. It's been a while tho so my exemplary memory is at it, forgetting useful stuff like this and remembering minutiae...

If 8.x is not good enough I think I'll have two options: upgrade to testing which probably has 10.x, or the better option is to activate guix on debian stable and use --with-source (which I wanted to try anyways). Building a GCC tarball is an option, but I generally avoid that as it confuses the system sometimes...

Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!