39 ms·
It's hard to imagine a situation where the hash function would be so slow as to justify adding 4 bytes to every string.
by mtdewcmu 11y ago
It's hard to imagine a situation where the hash function would be so slow as to justify adding 4 bytes to every string.
- joosters 11y agoIf your strings are large, then calculating the hash will take time AND the extra 4 bytes for hash storage will be minimal extra overhead. You can easily find good & bad cases for all of these string implementations. They all have tradeoffs.