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: [EMAIL PROTECTED]

"Det �r aldrig f�rsent att ge upp"
_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to