On Thu, Mar 27, 2014 at 8:12 PM, Tommi <[email protected]> wrote:
> [The following post has nothing to do with thread. I'm posting it here > because my new posts to this mailing list don't go through (this happens to > me a lot). Replies to existing posts tend to go through, thus I'm hijacking > my own thread.] > > Title: Compiling with no bounds checking for vectors? > > Why isn't there a compiler flag like 'noboundscheck' which would disable > all bounds checking for vectors? It would make it easier to have those > language performance benchmarks (which people are bound to make with no > bounds checking in C++ at least) be more apples-to-apples comparisons. > Also, knowing there's a flag in case you need one would put > performance-critical people's mind at ease. > > Because you can already have the functionality by using `unsafe`, so why should one at *twice* the same functionality in different ways ? I believe optimizers should be good enough to remove most bound checks (especially in loops), and if there are cases where they don't it might be worth checking what's preventing this optimization. > > _______________________________________________ > Rust-dev mailing list > [email protected] > https://mail.mozilla.org/listinfo/rust-dev >
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
