BurntSushi / aho-corasick

A fast implementation of Aho-Corasick in Rust.
The Unlicense
1.03k stars 93 forks source link

Is it ok to replace memchr with stringzilla for better performance? #144

Closed Lips7 closed 5 months ago

Lips7 commented 5 months ago

Check https://github.com/ashvardanian/StringZilla for more details, it shows stringzilla could outperform memchr.

BurntSushi commented 5 months ago

Ummmm... No. Stringzilla's benchmarks are pretty weird and limited. The memchr crate benchmarks not only include stringzilla, but are much more comprehensive. They do not support the same conclusions drawn by stringzilla's author.

I wrote more about this here: https://www.reddit.com/r/rust/comments/1ayngf6/memchr_vs_stringzilla_benchmarks_up_to_7x/krwqhhb/

Even if stringzilla were a little faster, there's no way it would make sense to add it as a dependency here.