Live data from Hacker News

State of Emacs Lisp on Guile

emacsninja.com

1–10 of 66 posts

Re: State of Emacs Lisp on Guile

#2
Unfortunately, this comparison uses Guile 2.2. Guile 3 is out and has greatly improved the performance via Wingo‘s JIT.

AFAIK the biggest point that brought Guile-Emacs to a standstill is the internal string representation of Emacs that is different from Guile’s native format.

Re: State of Emacs Lisp on Guile

#3
post #2

Unfortunately, this comparison uses Guile 2.2. Guile 3 is out and has greatly improved the performance via Wingo‘s JIT. AFAIK the biggest point that brought Guile-Emacs to a standstill is the internal string representation of Emacs that is different from Guile’s native format.

The author updated the post with benchmarks for Guile 3.

Re: State of Emacs Lisp on Guile

#4
> Most surprising is the abysmal speed of the test[4], I’m looking forward to anyone being able to explain that part to me.

Just a shot in the dark, but I think since so many tests are failing, all bets are off as to their performance. For example, I could see a test getting into a loop that normally only runs ten times and succeeds, but here gets to run a million times before the test aborts and gives up. Not sure that's what's at work here, but... tests typically have timeouts for a reason (and typically finish significantly sooner than their timeouts, for obvious reasons). :-)

Re: State of Emacs Lisp on Guile

#5
Guile is almost 30 years old. It’s GNU’s Scheme implementation. People wanted to replace the nonstandard Emacs Lisp with Scheme but since so much code was written in elisp, they didn’t want to throw it out.

At this point someone should abstract out the Emacs definition so others could build it with Scheme or Clojure.

Emacs is basically a Lisp interpreter. They wrote the parts that needed to be fast in C and the rest is elisp.

45 years ago Emacs needed to be built in C. Today the entire thing could be built with a standard Lisp.

I suppose if someone wrote an Emacs in Scheme, the projects could converge once Guile is integrated into Emacs

Re: State of Emacs Lisp on Guile

#6
Well, one of the major points of Guile (speed) is becoming obsolete as people are working in native-compiling elisp with libgccjit[0]. It provides great speed benefits: an average of x3~4 and up to ~x20 on recursive functions. With type annotations we can speed it up more — no need for a Guile JIT for speed anymore.

[0]: https://akrl.sdf.org/gccemacs.html

Re: State of Emacs Lisp on Guile

#7
Guile elisp is very slow. There are almost no optimization work done whatsoever, and the dynamic state stuff is very slow still. I don't know what the author expected, really.

I think Guile-emacs defers a lot of the core functionality to Emacs C functions as well, which would explain the failed tests.

Re: State of Emacs Lisp on Guile

#8
post #2

Unfortunately, this comparison uses Guile 2.2. Guile 3 is out and has greatly improved the performance via Wingo‘s JIT. AFAIK the biggest point that brought Guile-Emacs to a standstill is the internal string representation of Emacs that is different from Guile’s native format.

I am not sure that would help. Guile elisp is slow. I don't think there is anything stopping it from being as fast as guile sche, except for maybe man-hours.

Re: State of Emacs Lisp on Guile

#9
Honest question: what are the benefits of Guile Emacs in 2020 and after? Guile speed? I'm aware Guile (especially) later versions got really good VM and general optimizations, but with recent work in gccemacs [1] and having complete gcc optimization engine under the belt, can these two be even compared? Also, gccemacs showed you get visible speedups in some use cases only.

Have everything under Guile umbrella? Remember, Guile is getting trickier and trickier to build over the years and I don't want that from scripting language whose main idea was to embed it (presumably also ship the source alongside your program in some cases). I'm getting impression even python source & build is easier to ship and you can't go below that.

Also, modern Guile compilation time is abysmal. I recently ditched Guix [2] from my system because bootstraping on fairly modern laptop would take hours, mainly because Guile is trying to compile some helper scheme libraries needed for guix to work and recompile everything again with 2-3 different gcc versions (which are bootstraped too).

[1] http://akrl.sdf.org/gccemacs.html

[2] https://guix.gnu.org/

Re: State of Emacs Lisp on Guile

#10
This article is pretty biased against Guile. Guile-Emacs was a very neat experiment and the fact that it worked at all was remarkable but the prototype didn't get traction with the Emacs devs. It should be no surprise that it has issues because it was never completed! That's not an indictment of Guile or Emacs (both are wonderful), there just wasn't the necessary desire to make it happen so it fizzled out.
Post reply on HN