Compilation speed in SBCL over the years

Posted on 2007-02-07 in Lisp
» 8 comments

SBCL has a reputation of being slow at compiling programs. This has historically been a deserved reputation, since the cleanups done after the fork from CMUCL made the compiler a lot slower. While speed doesn't really matter when compiling individual functions, it's very important for large programs. Even if most Lisp development is done interactively, compiling a function or a file at a time, at some point one needs to ensure that the system still builds from scratch. With a large code base, this can take ages. It doesn't help that doing correct incremental builds for large Lisp systems is challenging. (See Andreas' asdf-dependency-grovel for one way to make it less painful).

In fact, most of my early contributions to SBCL were for making the compiler faster, since on the computer I had at the time an SBCL build took 1.5 hours. And even several workstation upgrades later, I still sigh every time I kick off a full SBCL build.

I just committed another batch of compiler speedup patches, and got to wondering what the cumulative effect of all these improvements over the years has been. So I ran my standard compilation speed benchmark suite on current CVS head, and on SBCL versions from one, two and three years ago. All SBCLs were built for x86, with the default build options. CMUCL 19d was also included in the test for comparison.

Here are the results (click on thumbnail for a larger image):

I'm pretty happy about the consistent trend for faster compilation times, despite new features and optimizations getting added, which usually act to slow down the compiler.

So the next time you're cursing about how long your build of McCLIM - or something similar - is taking, remember that things could be worse. You could be using SBCL 0.8.8 :-)

Next » Master's thesis accepted (2007-03-05)
Previous » Cross-referencing facility for SBCL (2006-12-05)

Comments

By Joel on 2007-02-07

Very impressive, looking forward to the next release. What did you use to create the graph?

By Juho on 2007-02-07

The graph is done with mix of gnuplot and Perl.

By Anon on 2007-02-07

You rock man. What else can I say?

By Alexander on 2007-02-08

You're the man Juho! :-)

By Cons on 2007-02-08

many thanks for your work, I wonder if benchmark times are different for SMP systems,

By Juho on 2007-02-08

There's a giant lock around the whole compiler in threaded SBCL, so you can't really get any benefit from SMP in that way. Rather there's a small slowdown due to the extra overhead for locking and dynamic variable manipulation.

Of course it's possible to use multiple processors for compiling by using separate processes, but that's also slightly tricky. (Though not impossible.)

By Paul Dietz on 2007-02-09

I may be strange, but I don't do the 'interactive development' thing in Common Lisp very much. I prefer to reload into fresh images fairly regularly. I do exploit dependency information to limit what has to be recompiled, though, with everything else being a fasl load.

I need to get back to SBCL testing again; I bet there are new compiler bugs. You guys have fixed all the old ones, right? :)

By Juho on 2007-02-11

We've been missing your reports, Paul :-)

Name
Message

As an antispam measure, you need to write a super-secret password below. Today's password is "xyzzy" (without the quotes).

Password

Formatting guidelines for comments: No tags, two newlines can be used for separating paragraphs, http://... is automatically turned into a link.