[Haskell-cafe] g++ std:map vs GHC IntMap

Don Stewart dons at galois.com
Thu Mar 26 13:26:18 EDT 2009


manlio_perillo:
> Bulat Ziganshin ha scritto:
>> Hello Manlio,
>>
>> Thursday, March 26, 2009, 6:39:12 PM, you wrote:
>>
>>> The test consists in adding 10000000 elements to an empty map.
>>
>> +RTS -c -F1.1
>>
>> then read about garbage collection
>>
>>
>
> It now requires 386 MB of memory, but is 4.7 times slower.
>
> So, now memory required is about the same as the C++ version, but how  
> can I optimize memory usage without having to tweak the garbage 
> collector?

You'll need similar data structures.


More information about the Haskell-Cafe mailing list