Alternatively, in this future where people are deploying Rust
applications to hundreds of thousands of servers, we could be using
Intel's Memory Protection Extensions for much cheaper bounds checking
etc. Which surely other applications will be using once bounds checks
are nearly free. Rust will still have the advantage of only needing
bounds checking for vectors and not *every* pointer like they are
integrating into GCC.

On Thu, Mar 27, 2014 at 4:42 PM, Tommi <rusty.ga...@icloud.com> wrote:
> On 27 Mar 2014, at 22:17, Steve Klabnik <st...@steveklabnik.com> wrote:
>
>>> 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
>>
>> A flag that removes safety is pretty antithical to the goals of the
>> language, IMHO.
>
> Yes, I agree it's not the official Rust way of things. But not providing the 
> option seems quite totalitarian. An example use case might be a company that 
> runs its code on 100,000 servers, and has do so for many years without a 
> hiccup. They realize they could save millions of dollars a year in 
> electricity bill by disabling bounds checking, and that's what they decide to 
> do. At this point they would really like to have that compiler flag.
>
> _______________________________________________
> Rust-dev mailing list
> Rust-dev@mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev



-- 
http://octayn.net/
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to