Trying to invent a better substring search algorithm (marcos.unsafe.rs)
from snaggen@programming.dev to rust@programming.dev on 29 Oct 2023 08:29 +0000
https://programming.dev/post/5086589

#rust

burntsushi@programming.dev on 30 Oct 2023 14:33 +0000

Disclosure: I’m the author of the memchr crate.

You mention the memchr crate, but you don’t seem to have benchmarked it. Instead, you benchmarked the needle crate (last updated 7 years ago). Can you explain a bit more about your methodology?

The memchr crate in particular doesn’t just use Rabin-Karp. It also uses Two-Way. And SIMD (with support for x86-64, aarch64 and wasm32).

snaggen@programming.dev on 30 Oct 2023 15:11 +0000

FYI: Not the author, just found it to be an interesting read. Notified the author, so lets hope he joins in for a nice discussion.

burntsushi@programming.dev on 30 Oct 2023 15:15 +0000

Ah gotya, thanks!