News for hackers. Stuff that matters.
Re:Cttrie – Compile-time trie-based string matching for C++ by beached_whale on Friday September 14, 2018 @11:32PM (#17992851)
The string compare has a lot of branching and looks at both strings. The hash method one checks the hash of the test string(size_t) with the size_t of the other string. The hash itself, say fnv1a, can be very quick(a xor and a multiply I think per character) I think I remember testing this and it was quicker. ill try to find the test, but it is easily done. Either way, it's the only way to use a switch statement this way

There are no comments on this comment yet.