5 ms·
Interesting. But I think restricively molding what can be compiled can also be an abstraction cost. Maybe it's more one of those "you know it when you see it" t
by fulafel 9y ago
Interesting. But I think restricively molding what can be compiled can also be an abstraction cost. Maybe it's more one of those "you know it when you see it" things?
- whyever 9y agoThere 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.