Common Lisp Success Stories

ziggy on 2002-01-16T14:32:12

Paul Graham just published a year-old email from Carl de Marcken about the design of Orbitz. It uses Common Lisp on commodity hardware, compiled down to machine code. It also makes heavy use of mmap() to access a database of flight information, managed by a C++ app (to avoid triggering the garbage collector).

It's a classic problem in computer science, one that's been the source of lots of algorithms and studies since the early days (the 60s at least!). Apparently, the classic old mainframe solution is sub-optimal, hard to maintain, expensive to run (millions of dollars for each node, and lots of nodes), and "coded in Assembly for speed". The Lisp based solution is running on Linux, NT, HP/UX and other various common platforms, and uses a mix of Common Lisp, C++ and Java. The algorithms are also supposedly newer and craftier: a reasonable request (BOS->LAX round trip, sorted) produces a search space of 250 billion possibilities, which are examined and returned in 10 seconds.

Wow.

Now, to be fair, this is a very atypical problem. It's been an edge case study since the airline reservation problem was first attacked almost half a century ago -- and it remains an edge case. Presumably, lots of brilliant people are hard at work with each working solution, and lots of performance hacks are required just to get it to perform in a reasonable amount of time (< 10s).

This raises a few interesting questions:

  • Has hardware increased in performance (and decreased in cost) to the point where Common Lisp can be the foundation of a well-performing solution (whereas hardware limitations previously made this approach prohibitive)?
  • Or is it that all of the hand-coded simplie-minded mainframe assembly language is simply a "better performing" solution (ignoring the issues of maintainability and testability)?
  • And, finally, how can these answers be extrapolated to Perl?