4 ms·
A hash function can't reject a string with a single test of the first byte. It just can't. For this application, that's a leg up which a hash won't be able to
by samatman 2y ago
A hash function can't reject a string with a single test of the first byte. It just can't.
For this application, that's a leg up which a hash won't be able to touch. The rest of the art here is shaving down the constant factor of a trie far enough that the initial boost pays off in real-world performance.