[Haskell-cafe] Re: Suspected stupid Haskell Question
Albert Y. C. Lai
trebla at vex.net
Thu Oct 18 15:09:04 EDT 2007
Thomas Hartman wrote:
> Since I'm interested in the stack overflow issue, and getting acquainted
> with quickcheck, I thought I would take this opportunity to compare your
> ordTable with some code Yitzchak Gale posted earlier, against Ham's
> original problem.
> As far as I can tell, they're the same. They work on lists up to 100000
> element lists of strings, but on 10^6 size lists I lose patience waiting
> for them to finish.
> Is there a more scientific way of figuring out if one version is better
> than the other by using, say profiling tools?
> Or by reasoning about the code?
It can be reasoned. Some people know how to do it. No one has written up
the method and theory properly. It is currently rather ad hoc. I want to
write one in the future.
Some of the knowledge is in:
http://en.wikibooks.org/wiki/Haskell (Advanced Track, Haskell Performance)
Richard Bird's "Introduction to Functional Programming using Haskell",
second edition (chapter 7 "Efficiency", but also other chapters contain
anything that adequately defines lazy evaluation (or whatever evaluation
your favourite executor seems to use)
More information about the Haskell-Cafe