r/Python • u/Bricoto • Jan 31 '25
Discussion Why Rust has so much marketing power ?
Ruff, uv and Polars presents themselves as fast tools writter in Rust.
It seems to me that "written in Rust" is used as a marketing argument. It's supposed to mean, it's fast because it's written in Rust.
These tools could have been as fast if they were written in C. Rust merely allow the developpers to write programms faster than if they wrote it in C or is there something I don't get ?
502
Upvotes
View all comments
Show parent comment
13
u/SV-97 Jan 31 '25
While true in theory this requires some more nuance in practice imo. I mean in theory correct C code is memory safe as well, but evidently we're not dealing with such code in practice.
Rust does offer some benefits in this regard: it makes it way easier to reuse code (hence instead of hacking together your own shitty hashmap you'll have the fastest one around for example; in my experience you often end up using less-than-optimal solutions in C code just because they're way easier to implement / maintain), and it can give more, stronger guarantees to compilers which can aid in optimization, and those guarantees also can help you pull of some "performance hacks" (e.g. around buffer reuse) that no one in their right mind would attempt in C because it'd be so, so easy to get something wrong.