3 ms·
If 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
by joosters 11y ago
If 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.