text-containers

Memory-efficient string-indexed container types.

Latest on Hackage:0.1.0.0@rev:2

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

GPL-3.0-only licensed by Herbert Valerio Riedel
Maintained by [email protected]

This package provides memory-optimised implementations of string-indexed container types.

The API is aligned with the naming convention of the containers package's API.

The following data-structures are provided:

Data.TextArray.Unboxed
Array of unboxed ShortText strings.
Data.TextSet.Unboxed
Set of unboxed ShortText strings.
Data.TextMap.Unboxed.Lazy
Associative map from unboxed ShortText keys to non-strict values.

Where unboxed ShortText refers to strings being stored in their UTF-8 representation without any alignment/padding back-to-back thereby providing good memory locality for index operations, avoiding pointer chasing, as well as increasing memory efficiency by reducing memory waste due to alignment.