4 ms·
> It doesn't appear to query CPUID Yes, I'm actually looking for a good way to do it for other projects as well. I've looked into a couple more libs, and here
by ashvardanian 3y ago
> It doesn't appear to query CPUID
Yes, I'm actually looking for a good way to do it for other projects as well. I've looked into a couple more libs, and here is the best I've come up with so far: https://github.com/unum-cloud/usearch/blob/f942b6f334b31716f9bdb02eb6a25fa6b222f5ba/include/usearch/index_plugins.hpp#L200 https://github.com/unum-cloud/usearch/blob/f942b6f334b31716f...
> Your substring routines have multiplicative worst case
Yes, that is true. It's a very simple stupid trick, just happens to work well for me :)
> It seems quite likely that your confirmation step
We have a different library internally at Unum, that avoids this shortcoming. It has a few thousand lines of C++ templates with SIMD intrinsics... and it's definitely more efficient, but the margins aren't always high. So I kept the pure C version with inlined functions as minimal and simple as possible.
> It would actually be possible to hook Stringzilla up to `memchr`'s benchmark suite if you were interested. :-)
Yes, that would be a fun thing to do! I haven't had time to look into `memchr` yet, but would expect great perf from your lib as well. For me the State of the Art is Intel HyperScan. Probably the most advanced SIMD library overall, not just for strings. I was very impressed with their perf ~5 years ago. But the repo is 200 K LOC... So get ready to invest a weekend :)
That said, I'm a bit slammed with work right now, including open-source. Hoping to ship a new major release in UCall this week, and a minor one in USearch :)
- burntsushi 3y ago> It has a few thousand lines of C++ templates with SIMD intrinsics... Yes, that's what the memchr crate is, but the Rust version. > and it's definitely more efficient, but the margins aren't always high IME it can get pretty bad. > For me the State of the Art is Intel HyperScan. Yes. See https://github.com/BurntSushi/rebar https://github.com/BurntSushi/rebar and https://github.com/BurntSushi/aho-corasick/tree/feda22857e1d0dd069b9c8941f0caf47a19ad078/src/packed/teddy https://github.com/BurntSushi/aho-corasick/tree/feda22857e1d...