HACKER Q&A
📣 gypsyharlot

Gnu Guile or Racket for Performance?


I am considering dabbling a bit with Lisp and I don't want to encounter something like Python's GIL or anything like that, so I am wondering which of these two implementations you would recommend? What are pros and cons? I have narrowed it down to these two.


  👤 brudgers Accepted Answer ✓
Common Lisp.

I love Racket. It's a broad ecosystem of endless libraries, good documentation, and everyone rowing the boat in the same direction.

But Common Lisp. Performance is important to the Common Lisp community. It has been from the beginning long long ago.


👤 rscho
Racket allows process-based parallelism (multiprocessing in python) and also has (less useful) futures. It also has green threads. Performance is very much ok for most tasks, although clearly the most performant lisp is Common Lisp.

Now, from a user perspective I think you should probably refrain from jumping onto a language based on potential performance. Common Lisp is a huge language, and writing performant code will require you to know much about both the language and its tooling/implementation. By comparison, Racket is simpler to jump into, if only because the core language is much smaller (the macro system on the other hand, is more complex). So it all depends what you're expecting from the experience: learning? having fun? becoming an expert?

I don't know Guile, but obviously it's going to be closer to Racket than Common Lisp.


👤 bitwize
Recent versions of Racket are based on Chez Scheme, which emits faster Scheme code than any other currently maintained Scheme compiler. If you want balls-out performance, Racket is the better choice.

I still recommend you evaluate them both, but people's time being limited I can see why you might not.


👤 auganov
If you're interested in concurrency specifically (since you mention the GIL), Clojure has a pretty great concurrency story. But raw performance of idiomatic code is probably inferior to Common Lisp.

👤 soegaard
Racket.