4 ms·
Heck yeah, thanks. If the first 4 bytes of the string are the same, the strings are likely to be equal. Similarly, the first 4 bytes of the strings can be u
by chaps 3y ago
Heck yeah, thanks.
If the first 4 bytes of the string are the same, the strings are likely to be equal. Similarly, the first 4 bytes of the strings can be used to determine their relative order most of the time.
That's a fun heuristic.
- ashvardanian 3y agoYes, it was very practical in most cases, but v3 only uses it for short needles with SWAR. SIMD variants will use Raita-style heuristics.