Brandon S. Allbery KF8NH ha scritto:
On 2009 Mar 26, at 11:39, Manlio Perillo wrote:
The execution time and CPU usage is almost the same.
However the C++ version requires 305 MB, the GHC version 617 MB.
I wonder how much of that is due to lifting (i.e. laziness).
http://hpaste.org/fastcgi/hpaste.fcgi/view?id=2911
Performances are the same; but I'm not sure if this removes all laziness.
I have changed
ins t (k,x) = insert k x t
to
ins t (k,x) = k `seq` x `seq` insert k x t
Manlio
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe