Monday, May 23, 2011

The Cannonball Express: Now with more Express!

Correction: In writing this post, I used my own article (quoted below) as source material. Re-reading this post a few weeks later, I realized that I'd made a historical error in that article, and perpetuated it in this post. I programmed the Cray in 1989, ten years before writing the article, and not twenty years earlier in 1979. I've corrected the post.

Twelve years ago, in 1999, I wrote an article for TidBITS called Power Macintosh G3: The Cannonball Express. It was a discussion of speed in computers, and how software and hardware factors contributed to the simple-sounding notion of "speed". Part of it was a (highly unscientific!) comparison between the speed of the new-in-1999 Power Macintosh G3, and a Cray Y-MP supercomputer that I'd had a chance to program some ten years earlier, circa 1989.

You can read the article if you like—it's not too long, and it's written for the non-technical reader (and the puzzle is fun, too). Or you can get a quick summary by reading the next couple of paragraphs here:


The highly unscientific comparison was a puzzle-solving problem I'd written, called "Piper". The article discussed the evolution of Piper and the techniques I'd applied to try to make it run faster. There was a particular puzzle called "woodchuck" that I wanted to solve, because for years it had proven to be too big a problem for Piper to handle in any reasonable time period. The Cray, a $15,000,000 room-filling monster that was one of the fastest computers in the world at the time, finally solved it in a 20-hour run.

Ten years later, I tried running Piper again on the latest-and-greatest Macintosh tower, and it blew away the Cray by solving "woodchuck" in under two minutes!

Twelve years after that—that is, a few days ago—I remembered the article. Piper's source code was made available with the article. After a brief search occasioned by a stale download link, I found the source, downloaded it, tweaked it a bit for a modern compiler, and ran it on my 2.8 GHz, dual processor Quad-Core Intel Xeon Macintosh tower. The results: on this hardware, Piper solved "woodchuck" in 14 seconds flat, taking 9 seconds to find the best solution and then running another 5 seconds to ensure that no better solution exists.

Nine seconds. Wow.

A word about Solitaire Till Dawn
I continue to get comments and mail, urging me to work hard on a Lion-compatible version of Solitaire Till Dawn. I assure you all, I am working hard, and making good progress. You can keep an eye on that progress by visiting this blog and checking the SOLITAIRE TILL DAWN update box in the upper-right corner of the page. I post updates there two or three times a week, usually. And as always, thanks for your support, your interest, and your patience while I get this done!