Finally, Gerry Sussman said "Of course, you can't expect Lisp to do something like that; Lisp can't do things like this. If you want to deal with massive data sets, you have to use C. It is sad but true." I said, "Gerry, I think this would run on an old 1 MIPS 3600 with 8 Mbytes of RAM. I'd just rewrite this in Common Lisp. The code would be cleaner because of the generic functions for sequences and I'll throw out my private sort function and just use the one built into Common Lisp." Sussman said "If that is true then the whole Scheme project has been a waste and I'll shut it down."

"Don't say that, Gerry!" I admonished. "I've written a lot of Lisp Machine programs over the years and I'm pretty sure that it can do this." Sussman was insistent. If that creaking old LispM could sort the phone numbers, MIT Scheme was history.

It took me 20 minutes to convert the code, which ended up being about one third as many lines. It took 45 minutes to run on the 3600 whose paging bar was on continuously (reading a 30 Mbyte file into VM) but it terminated with the answer I needed.

Gerry was despondent until Bill Rozas, his grad student and one of the scheme implementors, showed up. "Of course MIT Scheme couldn't run it. That's because you were using READ to read numbers. You can't do that for 300,000 numbers. You have to write your own READ-NUM that is specialized just to read numbers. Then it will run fine." Sussman breathed a big sigh of relief. I switched to Macintosh Common Lisp.



-- Philip Greenspun, January 4, 1998