3 ms·
You started with this... take: > Rust feels like a Python developer’s idea of a high-performance computing language. It’s a great language for many kinds of ap
by burntsushi 2y ago
You started with this... take:
> Rust feels like a Python developer’s idea of a high-performance computing language. It’s a great language for many kinds of applications — just not when you need to squeeze out every bit of performance from advanced hardware.
And went on to say that Rust in particular is problematic for:
> byte-level processing
It's particularly odd for you to say this given that the memchr Rust crate is just as fast as stringzilla for substring search. And is generally faster in cases where the needle is invariant, because stringzilla doesn't have APIs for amortizing searcher construction.
We've had a discussion about this before where I provided receipts[1] and we have not had a meeting of the minds on this point. The thing I'm trying to achieve here is to point out that your claims are contested and there is evidence that you're wrong. And so I'd caution readers to also in turn question your higher level claims about Rust being a "Python developer's idea of a high-performance computing language."
[1]: https://old.reddit.com/r/rust/comments/1ayngf6/memchr_vs_stringzilla_benchmarks_up_to_7x/krwqhhb/ https://old.reddit.com/r/rust/comments/1ayngf6/memchr_vs_str...
- ashvardanian 2y agoHey! I just mean that there is a very large category of developers, generally coming from the Python world, expecting that switching to Rust is supposed to solve every performance-oriented problem, providing a State-of-the-Art solution magically :) Sadly, programming doesn't seem to work that way. There are always tradeoffs. Rust does some things very well, but it wouldn't be my first choice for others. MemChr is a lovely package, and there are a few other really cool SIMD projects in the Rust ecosystem. Regardless, my development velocity for HPC-related projects is higher in C/C++, and I get much more flexibility to leverage newer hardware features, like AMX and SME.
- almostgotcaught 2y agoDon't worry his comment is obvious clickbait (complete with a plug for a random blogpost written by him). People that matter (people that are actually writing simd for their day job) can immediately spot a poseur (especially relative to you and Raph).
- burntsushi 2y agoTo be clear, I don't support this. StringZilla is a real and useful project, and its performance is competitive with memchr. They aren't a poser. (There are reasons to use StringZilla over memchr beyond performance. StringZilla provides a number of interesting string operations beyond just substring search. The memchr crate is far more specialized.)
- ashvardanian 2y agoThanks, Andrew! Love your work too - keeps me on my toes ;) PS: Hoping to share a few more Rusty bits later this year.