4 ms·
But performance! Rust and other languages with bounds checking go out of their way to not do it once it is proven that they don't need to. It would be hard to d
by spullara 5y ago
But performance! Rust and other languages with bounds checking go out of their way to not do it once it is proven that they don't need to. It would be hard to do that as a data structure.
- oleganza 5y agoWell, here comes the type system, so your fancy data structure has zero cost. Rust recently got more support for const generics, so you could encode size bounds right in the types and skip unnecessary checks.
- spullara 5y agoOh that is what I was saying about Rust. I don't think that is possible in C, at least not without a huge amount of effort.