Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> We had many people interested in turning off bound checks with compile option, but it was rejected.

Can you cite where this happened? This sounds like it was an executive decision, but as I recall the community was opposed to a switch to turn off bounds checks. (Rightly so: the overhead of bounds checks is near zero.)

As I recall, there were some people asking for a bounds check switch, but they were mostly people coming from the D community and new to Rust who were asking for a copy of the -noboundscheck switch (without benchmarks to show that it would help). The more interesting option would be something to turn off the lifetime, borrow, and mutability checks. But when I suggested this, almost nobody seemed particularly interested.



Yes, I was referring to request to provide copy of -noboundscheck. You stated that nobody seemed interested in turning off safety features, so I provided a counterexample.

As a matter of fact, I am interested in -noboundscheck switch. The motivation is so that people can easily confirm bound checks overhead is zero by themselves, because it seems many people find this hard to believe. I didn't submit a pull request implementing this (it is easy to implement) because I thought it was fait accompli. Was I mistaken and you will support such pull request?


I actually intend to benchmark this myself in the future and write a comprehensive blog post on my findings. Personally, I would oppose any RFC that attempted to add such a compiler flag, especially if its only purpose was to prove a point.


It'd need to go through an RFC process, but I would be neutral and not opposed to such an RFC.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: