|
|
|
|
|
by esjeon
151 days ago
|
|
Rust is actually few steps above from the bare metal, to enforce its security invariants. Boundary checks (which breaks auto-vectorization of loops), stack probe, fat pointer (wastes register), fixed index type (uint), etc. There are other hidden costs coming from usage of std. Even `Result` is a bit of inefficiency. I'm not saying any of these are bad. I'm just saying Rust would be slower than C if *naively* used. |
|
(and yeah, the opt out question gets right to what you're saying about "naively used", I saw "unavoidable" but you're not actually saying it's unavoidable.)