3 ms·
Right, but all you have to do in C++ is switch the array implementation to bounds check by default. This is not rocket science, and is certainly easier than re
by hedora 8y ago
Right, but all you have to do in C++ is switch the array implementation to bounds check by default. This is not rocket science, and is certainly easier than rewriting large code bases from scratch.
Similarly, I could complain that rust arrays are too slow, and produce an array implementation that uses unsafe under the covers.
- steveklabnik 8y agoDropbox did this in their Rust code: https://github.com/dropbox/rust-brotli-decompressor/blob/master/src/memory.rs#L71-L76 https://github.com/dropbox/rust-brotli-decompressor/blob/mas... https://github.com/dropbox/rust-brotli-decompressor/blob/master/src/memory.rs#L18-L23 https://github.com/dropbox/rust-brotli-decompressor/blob/mas... Toggle the feature, remove the bounds checks unconditionally.