emacs/var/elfeed/db/data/fe/fee2473b2fd4f3f80b443ee3fbe9d8be9a372f49
2022-01-03 12:49:32 -06:00

4 lines
1.8 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p>Andrea Corallo gave an interesting talk at <a href="https://emacsconf.org/2021/">EmacsConf 2021</a> on his <a href="https://emacsconf.org/2021/talks/native/">Emacs Lisp native compilation project</a>. For those who dont know, the native compilation project provides a compiler that converts Emacs Lisp into native code for the host machine. The idea is to enable the elimination of much of the Emacs C code in favor of Elisp. Native compilation will be officially released with Emacs 28, which is currently at the <a href="https://irreal.org/blog/?p=10161">Pretest 1</a> phase. That means that native compilation will soon be available and supported for anyone who wants it.</p>
<p>Corallos implementation is a <i>tour de force</i>. His idea was to convert the Elisp byte code into IR for the GCC. He started off with a straightforward translation from the byte code to IR but the Elisp virtual machine is stack based whereas modern CPUs are register based. That means that the naive approach didnt realize the performance increase youd expect.</p>
<p>The current implementation has several passes to translate and optimize Elisp byte code into GCC IR code that GCC can also optimize and use to generate efficient machine code. Corallos talk takes us through the compilation process and explains the problems he encountered.</p>
<p>I found that it was easier to view the video on <a href="https://emacsconf.org/2021/talks/native/">Toobnix</a> because I could make it full screen. The video itself is 39 minutes 8 seconds long so you will need to set some time aside. If you have any interest in this technology, the video is definitely worth your time. Even if you dont care about the technical details, native compilation is going to be a boon to your Emacs experience simply because things will be faster.</p>