2 ms·
Safe Rust has no UB, outside of some bugs, to be clear. That said, optimization is all about guarantees: this broad of a claim (UB vs info) because both are ab
by steveklabnik 9y ago
Safe Rust has no UB, outside of some bugs, to be clear.
That said, optimization is all about guarantees: this broad of a claim (UB vs info) because both are about what's guaranteed, and what's not. That is, they play similar roles, so you'd have to be comparing how much of each is in what amount in what code.
We generally expect Rust to be roughly as fast as C, sometimes faster, sometimes slower. Modulo optimizer bugs in each case, of course.