[Haskell-cafe] Compressed Data.Map for more efficient RAM usage?

Johan Tibell johan.tibell at gmail.com
Thu Feb 16 23:29:47 CET 2012


On Thu, Feb 16, 2012 at 2:03 PM, Antoine Latter <aslatter at gmail.com> wrote:
> You could have a re-implemented HashMap which would un-pack the
> payload's ByteString constructor into the leaves of the HashMap type
> itself.
>
> Then you would save on both the keys and the values.

Note that ByteString has a high per-value overhead due to the internal
use of ForeignPtrs and indicies that track offset/size:
http://blog.johantibell.com/2011/06/memory-footprints-of-some-common-data.html

-- Johan



More information about the Haskell-Cafe mailing list