2 ms·
Tries are also used to efficiently store names of functions in macOS / iOS binaries (Mach-O format) and work great for that purpose because a lot of functions h
by petethepig 5y ago
Tries are also used to efficiently store names of functions in macOS / iOS binaries (Mach-O format) and work great for that purpose because a lot of functions have the same prefixes [0].
Indexes in mongodb use a similar concept (they call that prefix compression [1]), and that allows them to store indexes more efficiently.
We use them at Pyroscope and we wrote a blog post about our storage design [2] There are even some animations :)
[0] https://www.m4b.io/reverse/engineering/mach/binaries/2015/03/29/mach-binaries.html#export-trie https://www.m4b.io/reverse/engineering/mach/binaries/2015/03...
[1] https://docs.mongodb.com/manual/reference/glossary/#std-term-prefix-compression https://docs.mongodb.com/manual/reference/glossary/#std-term...
[2] https://github.com/pyroscope-io/pyroscope/blob/main/docs/storage-design.md#step-2-adding-tries-to-store-individual-symbols-more-efficiently https://github.com/pyroscope-io/pyroscope/blob/main/docs/sto...