Monday, May 31, 2004
I just spent a couple of days writing up a short case study comparing two implementations of a DNS resolver decoding library in Java and in Lisp. One of the things that first attracted me to Lisp was Paul Graham's claim that Lisp was a more efficient language and that people could write programs faster in Lisp. I wrote my resolver library as my first "larger-than-factorial" Lisp program because I had just been working on a similar library for Java, and I wanted to compare the two languages. This case study provides a pseudo-academic comparison of the two implementations.
The results are quite favorable for Lisp. Line count and method/function count were about 45% less than in Java when I normalized the programs for equivalent functionality (see the paper for more info). This is quite a difference. While I didn't write either of the programs under controlled conditions such that I can actually compare development time directly, by implication shorter programs get written faster, and Lisp wins that comparison.
Links to this post: