
Cedarwood: Efficiently-Updatable Double Array Trie in Rust - paulmeng
https://blog.paulme.ng/posts/2019-07-14-cedarwood%3A-efficiently-updatable-double-array-trie-in-rust.html
======
karterk
The trie is my favorite data structure. It allows you to build inverted
indices (i.e. hashmaps) that can also be used for prefix lookups of tokens and
for spelling/typo correction.

With a trie, it's very efficient to calculate Levenshtein distances. Here's a
post ([http://stevehanov.ca/blog/?id=114](http://stevehanov.ca/blog/?id=114))
that has a good primer on that.

If you love this sort of thing, here's a fast and neat memory efficient Trie
variant:
[https://db.in.tum.de/~leis/papers/ART.pdf](https://db.in.tum.de/~leis/papers/ART.pdf)
(Adaptive Radix Tree).

I've used ART as a building block to create an open source typo tolerant
search engine called Typesense
([https://github.com/typesense/typesense](https://github.com/typesense/typesense)).

~~~
polmuz
I used the same solution for an address fuzzy search, it was very fast and
efficient. Tries are great!

------
deivid
Why is it that this page takes 10s to render some basic text? I have third-
party JS disabled, but if I also disable first-party JS the text renders
immediately..

~~~
the8472
AMP is to blame, it delays body visibility. But there's a <noscript> override
that shows it immediately.

~~~
ldng
How to make AMP look good ? Ostensibly degrade the experience without it ...

