#stringzilla

N-gated Hacker Newsngate
2025-09-23

🚀 Wow, someone invented a string processing library 109 times faster than an Nvidia H100. 🤔 But wait, isn't that just like saying you run faster than a tortoise in a Ferrari race? 🐢🏎️ I guess we'll all be using "StringZilla" at our next pointless speed competition! 😂
ashvardanian.com/posts/stringw

2025-08-05

Meow!

So, pet has tried some approaches but could only squeeze the same performance as . Let the implementation use memchr/memcmp only because it's faster than stringzilla on x86_64. On ARM64 it makes no difference.

2025-07-30

After the very basic optimization pw_strstr shows the same result as on ARM64

But it's still too far to the standard library which is three times faster.

2025-07-30

Okay, pet used . But how about ? Will show its full potential given that warnings were related to GCC options?

Nope! Well, it's better now, only 0.068s vs 0.1s but the standard library is still superior: 0.02s.

Never trust humans who say their product is 10x faster.

Why 10? Not 9 nor 11?

Because 10 sells best.

2025-07-29

LOL, stringzilla does not even compile on pet's ARM64 board. With NEON, btw.

Ok, turned off -Wall and here's what pet observes:

strstr: 0.02s
sz_find: 0.1s

So, in what it was able to compile to, stringzilla is 5 times slower.

What's interesting, strstr shows exactly the same performance on pet's x86_64 laptop and ARM64 SBC.

PetWay pw_strstr is twice slower on ARM64 than on x86_64.

And it's 10x times slower than strstr on the same ARM64.

2025-07-29

Comparing pet's pw_strstr performance with strstr and sz_find. The latter is from

Haystack: 10M string of repeating 0123456789
Needle: 123456789abc

So, the entire haystack will be scanned and the needle will never be found.

First, pw_strstr is 5 times slower than strstr and pet does know why and will try to optimize.

Second, sz_find has exactly the same performance as strstr. They claim is 10x faster but that's not true.

Never trust humans.

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst