High-Performance Haskell
Posted by Eric Kidd Mon, 22 Jan 2007 13:32:00 GMT
Yesterday, I was working on a Haskell program that read in megabytes of data, parsed it, and wrote a subset of the data back to standard output. At first it was pretty fast: 7 seconds for everything.
But then I made the mistake of parsing some floating point numbers, and printing them back out. My performance died: 120 seconds.
You can see similar problems at the Great Language Shootout. Haskell runs at 1/2th the speed of C for many benchmarks, then suddently drops to 1/20th for others.
Here’s what’s going on, and how to fix it.
(Many thanks to Don Stewart and the other folks on #haskell for helping me figure this out!)
Read more...