4 ms·
There is certainly a cost, I'm just not sure I would call it abstraction cost. Is memory safety an abstraction? Safe Rust has runtime costs as well (mostly bou
by whyever 9y ago
There is certainly a cost, I'm just not sure I would call it abstraction cost. Is memory safety an abstraction?
Safe Rust has runtime costs as well (mostly bound checks).
- littlestymaar 9y agoRust's bound checks are cited a lot here on hn as a performance concern but in practice I rarely encounter them because in rust you mostly use the iterator API for loops and it doesn't need bound checking. For an illustration of a safety-related runtime cost that you almost always have to pay, Uft8 validation of strings is a better example IMHO.