home ¦ Archives ¦ Atom ¦ RSS

Revenge of the Lisp Machine

SBCL Circles

Well over two years ago, I blogged about kicking the tires on various Lisp implementations. At the time, I observed how modern machine performance had blown past the “inefficiencies” we saw back in the 80s to mid 90s.

Fast forward to last week, mid-February 2011. I’m stuck in a not-particularly captivating conference, with a relatively new Macbook Pro, dual core Intel i7 and 8 MB of memory. What’s a Lisp nerd to do, but check out how the new ride rolls. So I grab and install every Lisp and Scheme implementation under the sun, since I’ve got so much idle time, and quickly whip out a recursive fact function in all of them.

Wow! All I can say is that I was blown away by the performance observed running a few micro-benchmarks. When a Common Lisp compiles to native code and can do (fact 1000) in about a millisecond, you’re cooking with gas.

That prompted me to revisit the Lisps on my measly old, circa 2008, bottom of the line, white Macbook. Even if it’s an order of magnitude slower, we’re still looking at hundredth of a second performance. In doing so, I discovered the fabulous Quicklisp project, which makes installing Common Lisp packages butt easy across a number of implementations. Turns out there’s the nice LISPBUILDER-SDL package, which makes the cross-platform multimedia SDL library available within Common Lisp.

The above screen capture is an example from LISPBUILDER running in SBCL. If you squint close enough at the lower right, you can see the frames per second, FPS, reading. That’s a 30.29.

A compiled Common Lisp on a pokey old Macbook can easily do 30 FPS of graphics rendering. And here I am struggling to get Python up to the pace of processing.

I’ll have to get substrate implemented in SBCL just for comparison and we’ll go from there.

© 2008-2024 C. Ross Jam. Built using Pelican. Theme based upon Giulio Fidente’s original svbhack, and slightly modified by crossjam.