8 ms·
The Emacs-28 release branch has been created
- hprotagonist 5y agowoooo, native comp!
- fayten 5y agoIt's fantastic! If you are on a mac you can try it right now with emacs-plus[1]. Emacs plus even works natively with apple m1. Doom[2] with CIDER[3] is such an incredible dev experience and I've only recently started using clojure. Native comp makea everything so snappy. [1]https://github.com/d12frosted/homebrew-emacs-plus https://github.com/d12frosted/homebrew-emacs-plus [2]https://github.com/hlissner/doom-emacs https://github.com/hlissner/doom-emacs [3]https://github.com/clojure-emacs/cider https://github.com/clojure-emacs/cider
- taeric 5y agoI'm torn. I do feel it makes improvements. But I also add "-O3" to my compilation. And I also feel that makes things faster. I add "-march=native" on my Linux box. Again, feels faster. 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?
- michaelhoffman 5y agoIf you load a bunch of packages at startup that take several seconds to load that is as good a benchmark as any. I have this at the end of my init.el: (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))))
- taeric 5y agoMy startup had always been under a second. On a Mac, the command to get the path right is the longest pole. Remains so in native. That said, I'll play with it some. Still looking for a broader benchmark, though. Edit: Looks like I lied. Startup is about 2 seconds, but is mainly dominated by a network hit to refresh packages. (So, slower if I'm on a bad network... I should fix that.) Your script, though, is odd, as I can get to the Messages buffer and wait a second before I see that message show up. (Also, you can just eval (emacs-init-time))
- michaelhoffman 5y agoI'm sure I got this code from someone else, was going to replace it with (emacs-init-time) myself but I suppose it's nice to only have the first two numerals after the decimal point which this code does and (emacs-init-time) doesn't.
- taeric 5y agoFunny, coming back to this, if I recompile without native compilation and any other flags, I get faster startups. By upwards of 1 second. (So, from almost 2 seconds to almost 1 second.) An emacs -q startup is roughly the same. And I maintain that many things feel snappier with the optimization flags.
- ashton314 5y agoApropos of the path: have you tried setting your path in, say, `.zshenv`? When I started using that, I was able to shave off a significant amount of time because Emacs didn't have to fire up a full interactive shell to grab the env vars.
- taeric 5y agoThis is only on a Mac, right? I'll look into it, not a problem on my other machine.
- 5e92cb50239222b 5y agoIME the only thing -march=native does is it makes it impossible to boot your system on an older microarchitecture (which is trivial with Linux otherwise — I really don't understand those who bring their bad Windows habits and do a reinstall when moving between systems).
- taeric 5y agoI mean, it would do that. But, I also have never just moved the hard drive between machines. I've only owned two machines in the last decade. So, not even something I have had a lot of opportunity to do. Back to the point, though, I'm assuming that libc dynamically does most of the optimizations that native enables?
- wry_discontent 5y agoI second emacs-plus. It's been a very pleasant experience on my new M1, especially relative to the default homebrew version which I could not keep working for more than 10 minutes.
- nanna 5y agoWhat actually is native compilation? Anyone mind explaining?
- ajdlinux 5y agoFrom what I can tell from https://www.emacswiki.org/emacs/GccEmacs https://www.emacswiki.org/emacs/GccEmacs - enabling a JIT for Emacs Lisp
- vkazanov 5y agoIt's not a JIT compiler, really. Just one more step (a big one, admittedly) for the existing bytecode compiler.
- agumonkey 5y agoAot in a way right ?
- vkazanov 5y agoYes, some kind of lazy ahead-of-time compilation. By default the native compiler kicks in as soon as Emacs finds a bytecompiled file without a machine code equivalent. The resulting machine code is cached then for future use so this only happens once per a single *.elc file. At least this is what i remember from the last time I checked the code :-)
- kragen 5y agoCompiling to machine code
- vkazanov 5y agoEmacs lisp can be compiled into bytecode (*.elc files) for faster execution. 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 https://akrl.sdf.org/gccemacs.html
- agumonkey 5y agoI like native comp (and major kudos to the devs) but my poor ThinkPad x201 smokes after large ELC cache update.
- diegoveralli 5y agoNative comp is great. Most of the speed ups are modest, but it's really noticeable in some really slow operations. 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.
- pvaldes 5y agoThey grow up so fast...
- derekzhouzhen 5y agoFinally, my patch written and upstreamed in 2020 is going to see the light of the day!
- pxc 5y agogo ahead, brag about it: what does your patch do? :)
- derekzhouzhen 5y agoIt is a bug fix, nothing fancy.
- thuccess129 5y agoFeature request. Let Emacs spawn background Emacs subprocess to do batch jobs like Org Mode publish on buffer-save without spinning hour-glass freezing out the emacs-user from interactive editing.
- gpderetta 5y agoHum async-start from async.el seems exactly what you want? 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.
- rendall 5y agoSo. It has come to this.
- oehtXRwMkIs 5y agoAnyone know if adding tree-sitter to core will be part of version 28?
- karthink 5y agoTree-sitter integration (through the fast C layer) is in its early stages, I wouldn't expect it until Emacs 29 or later. There is a lisp-based tree sitter package that works for now, but there are no plans to add it to the core.
- hd4 5y agoDetailed changelog here: https://github.com/emacs-mirror/emacs/blob/master/etc/NEWS.28 https://github.com/emacs-mirror/emacs/blob/master/etc/NEWS.2...
- sys_64738 5y agoEmacs is just the most amazing software ever. Even more important and influential than Linux.
- cjohansson 5y agoEmacs is a perfect GNU propagator. To be able to use its full power you need an entire ecosystem of GNU tools. For that reason you can only get its full power by abandoning your Windows or Apple OS and converting to GNU/Linux and if you use Emacs you will do that sooner or later