2 ms·
> Clearly you can only do worse in Rust than you'd have with perfect C. Is this clear? Why would the best Rust be worse than the best C?
by steveklabnik 3y ago
> Clearly you can only do worse in Rust than you'd have with perfect C.
Is this clear? Why would the best Rust be worse than the best C?
- SirMittens 3y agoI assume parent probably meant that the worse you can do in rust (e.g use of unsafe... etc) would just put you back at C level of memory safety.
- Anonbrit 3y agoRust has a few small but unavoidable runtime overheads compared to the best C (maybe they can be avoided with the right unsafe usage but that removed most of the benefits of rust). They are difficult to see the affect of without micro-benchmarking in my very limited experience, but C can avoid them
- steveklabnik 3y agoI am not saying that Rust is better, but not worse. Saying unsafe Rust doesn't count because it's unsafe but C gets to count feels like an unfair comparison to me: this did start out with assuming perfection on both sides.