3 ms·
Yeah, I suspect it wouldn't actually be a win, though of course it will depend on the implementation. Just pointing out that "there's no memchr for consecutive
by comex 9y ago
Yeah, I suspect it wouldn't actually be a win, though of course it will depend on the implementation. Just pointing out that "there's no memchr for consecutive sequence of characters" isn't exactly true.
- Manishearth 9y agoI mean, you can count a simple string search loop as "memchr for consecutive sequences" as well, what I meant was a technique that uses the same bitmasking trick as memchr, applied to multiple bytes (perhaps via SIMD). It's doable.