2 ms·
There's no way the cache thrashing of walking a trie would cost less than the integer compares the author used.
by jeffrallen 4y ago
There's no way the cache thrashing of walking a trie would cost less than the integer compares the author used.
- yakubin 4y agoNot just cache, but also the branch mispredictions while walking a trie.
- scotty79 4y agoSince the trie is static it could be pregenerated and held in small static array that might fit in a cache line ... I think. I don't really know this stuff. But still probably would be slower especially if there aren't many misses that could be quickly rejected by the trie.
- MattPalmer1086 4y agoYes, for a small set of strings, which is the problem he is solving, you are almost certainly right.