Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do the various ANSI CL implementations differ?

See Common Lisp Implementations: A Survey by Daniel Weinreb.


If you are on a machine that can run SBCL, you should use it. It's the fastest free Lisp compiler (it can generate code that is as fast as Haskell, OCaml, Java, C, and C++, which are all very very fast, especially compared to Python and Ruby). It also is a fairly complete implementation, and supports most of Swank's features (for SLIME), which is nice when you are developing.

As some of the other comments mention, you won't really notice any differences when you are first starting out. All the free CL implementations are "fast enough" and support all the features you'll need. But if you start writing production software, you will appreciate SBCL's features. OTOH, there's really no reason not to switch now.


There are portions of ANSI CL that leave certain details up to the implementations to determine; you will find that for those parts of the standard, each implementation will have its own quirks.

Also, look for things that are important to the runtime but not defined in the language: things like threading and multiprocessing and garbage collection will vary substantially in performance and reliability.

I have found SBCL to be the easiest implementation to work with in Linux; it has good support for threading in Linux. I can't say much about the garbage collector, because it hasn't mattered to me much yet.

On Windows, your best bet will probably be Allegro or LispWorks, although I've had some success with clisp on Windows. The Windows port of SBCL is progressing, but I haven't used it much, so I can't really comment.

Generally speaking, an understanding of these kinds of things that are difficult to acquire through research or analysis; it comes through experience. Just pick a decent implementation that you're comfortable with, and get to work. You'll figure out the tricky stuff as you go.


I have been looking at Win32 solutions to the same question. As far free Lisp implementations on Windows, I would strongly recommend Clozure CL (CCL). There are several reasons for this. The first is that Clozure supports 32- and 64-bit binaries. It's very fast, and somewhat compact. But most importantly, it's consistent and correct. I find it to be an extremely mature Lisp, after working with Lispworks (which I miss) for several years. CCL does a very nice job with native OS threads, sockets, and some other elements that are not part of the CL spec. Its implementation of CLOS seems to be extremely thorough. And it's GC and memory management are excellent. I compared CCL to SBCL on Win32, and while SBCL was a bit faster on several benchmarks, it cons'd up a lot more, and its image kept growing and growing, even after several forced GCs. Meanwhile, CCL was consistent, small, quick, and lovely to use. And if you want a platform that's consistent across Windows, Mac, and Linux, and has both 32- and 64-bit support, then look no further.

I did try CormanLisp on Win32, and there were many things about it I liked. But it does not run properly on 64-bit Windows platforms, and is limited to Win32. It's also not free, and somehow I had it crash on me when I'd throw some garbage code at it. I also was easily able to make SBCL crash. Not so with CCL. Rock-solid. Really, those guys did an amazing job, and ultimately will help keep Lisp alive.

As for SLIME, I didn't try to get SLIME working with SBCL, but I did get it working nicely with CCL. No matter what your fancy is, I advise that people write code to be easily portable. Aim for Windows, Mac, and Linux, and aim for 64-bit. If you consider these, then CCL is your best choice overall.

A last attempt at an answer to this is to consider what is wrong with the others. Here's what I've come to find:

  • CLISP is nice, but is far slower, relative to SBCL or CCL. I see little upside
  • SBCL seems poor on Win32. Image size can get big.
  • CormanLisp is good on Win32, but not portable, and does not support Windows x64. It also seems that Roger Corman is not actively developing CormanLisp, which is a shame, but it's the reality.
  • Clojure (with a "j") is not Common Lisp. As nice as it may be, I think that if you already know CL, then it's not worth the overhead of learning Clojure's many differences. I'm sure some may pick them up fast, but I surely did not. (If Java-compatible code is what you're after, then look at ABCL).

dave