Liking cljdoc? Tell your friends :D

Dictionary Layer — Implementations

Per-backend implementation guides for the dictionary layer (Layer 1).

The dictionary layer provides efficient storage and traversal of term collections. Each document here covers one concrete backend: its node representation, construction, query characteristics, memory profile, and the workloads it is best suited for. Use this index to pick a backend; see the layer overview for cross-cutting theory and the performance comparison for head-to-head numbers.

Implementations

DocumentPurpose
double-array-trie.mdDoubleArrayTrie (ASCII, u8) — recommended general-purpose, read-optimized static dictionary; ~6–8 bytes/char, fast queries.
double-array-trie-char.mdDoubleArrayTrieChar (UTF-8, u32) — character-level double-array trie for correct Unicode (CJK, emoji, combining marks).
dynamic-dawg.mdDynamicDawg (ASCII, u8) — thread-safe insert/remove DAWG with SIMD and bloom-filter optimizations for run-time-mutable dictionaries.
dynamic-dawg-char.mdDynamicDawgChar (UTF-8, u32) — character-level dynamic DAWG variant for mutable Unicode dictionaries.
suffix-automaton.mdSuffixAutomaton — substring/infix matching for full-text search.
pathmap-dictionary.mdPathMapDictionary — PathMap-backed dictionary adapter with persistent, structurally-shared tries.

Choosing a backend

Need run-time insert/remove?
├─ YES → DynamicDawg / DynamicDawgChar
└─ NO  (static / read-mostly)
    ├─ Unicode text? → DoubleArrayTrieChar
    ├─ Substring search? → SuffixAutomaton
    └─ Otherwise → DoubleArrayTrie  ⭐ recommended

Status: Living reference.

← Documentation Index

Can you improve this documentation?Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close