[Haskell-cafe] g++ std:map vs GHC IntMap
Manlio Perillo
manlio_perillo at libero.it
Thu Mar 26 13:05:58 EDT 2009
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
More information about the Haskell-Cafe
mailing list