
4 Mar
2004
4 Mar
'04
8:55 p.m.
On Thu, Mar 04 2004, David Sankel wrote:
The Haskell version takes significantly longer (and it gets worse for larger inputs). So it seems that imperative algorithms are much better for certain problems.
I say this is a case of bad code. Of course language <foo> is faster and better if you write horribly bad code in language <bar>. Taking the first solution found by searching with google I get times around 0.015s (real) for the Haskell version and 1.7s for your Java solution (which also seems to be overcomplicated to me). /Hampus -- Homepage: http://www.dtek.chalmers.se/~d00ram E-mail: d00ram@dtek.chalmers.se "Det är aldrig försent att ge upp"