4 ms·
Why would you think that? Rust is certainly a little bit slower than C/C++
by rs_rs_rs_rs_rs 3y ago
Why would you think that? Rust is certainly a little bit slower than C/C++
- mnd999 3y ago[flagged]
- qup 3y agoEverything I've read says that you're right in theory, but in practice, rust rewrites tend to outperform. At Mozilla's level, though, I wouldn't necessarily expect that to hold water. They should be able to write great code in either language.
- lxgr 3y agoI wouldn’t be surprised if rewrites in any language (including the original one!) would have a tendency to outperform. A rewrite (by people familiar with the original and its pain points) is an excellent opportunity to optimize.
- lrem 3y agoEh, no. A rewrite is pretty much always better. You now know the problem you’re actually facing. Drop all the little wrong assumptions. And in general are better equipped than the last time. I vaguely remember reading here about a company that slapped a backend together in Python. When they took off, the compute costs stung, so they rewrote in Go. Saved most of the bill. Some time later that started creaking, so they rewrote again. In Python, but managed to save most of the bill again.
- pcwalton 3y agoThey use the same compiler backend and you can generate pretty much any LLVM IR you want with Rust. You can argue about the performance characteristics of the kind of code the language encourages you to write, but a blanket statement like that isn't true.