Remix.run Logo
burntsushi 2 days ago

Nice. Yeah I'd have to actually look at what it did. For the task of substring search, it's extremely easy to fall into a local optima. The `memchr` crate has oodles of benchmarks, and some of them are very much in tension with others. It's easy to do well on one to the expense of others.

But still, very neat.

simonw 2 days ago | parent [-]

Here's the C code. It pretty much lifted every optimization trick it could find directly from your Rust code, as far as I can tell: https://github.com/simonw/research/blob/main/memchr-c-wrappe...