@hackage / text-containers

Memory-efficient string-indexed container types.

Latest0.1.0.0

About

Metadata

  • Last updated , by HerbertValerioRiedel
  • License GPL-3.0-only
  • Categories Data Structures
  • Maintained by: hvr@gnu.org

  • Lottery factor: 0

Links

Installation

Readme

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.