HORIZON HASKELLDocslts/ghc-9.14.xd82dee82026-10-12Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · d82dee8 · 2026-10-12

Package0.2.7.7DataData Structures

bytestring-trie

An efficient finite map from bytestrings to values.

Modules

3 modules
  • Data.Trie31An efficient implementation of finite maps from strings to values.
  • Data.Trie.Convenience21Additional convenience functions. In order to keep Data.Trie
Internal modules · 1

Description

An efficient finite map from bytestrings to values.

The implementation is based on big-endian patricia trees, like Data.IntMap. We first trie on the elements of Data.ByteString and then trie on the big-endian bit representation of those elements. Patricia trees have efficient algorithms for union and other merging operations, but they're also quick for lookups and insertions.

If you are only interested in being able to associate strings to values, then you may prefer the hashmap package which is faster for those only needing a map-like structure. This package is intended for those who need the extra capabilities that a trie-like structure can offer (e.g., structure sharing to reduce memory costs for highly redundant keys, taking the submap of all keys with a given prefix, contextual mapping, extracting the minimum and maximum keys, etc.)

Depends on

4 packages

Used by in this set · 1