Adam D. Ruppe:
I'm not comfortable with the recommendations for -noboundscheck
because I see the bounds check as a good thing and use it in
all my real world code. Getting used to turning it off
regularly kinda torpedoes the whole memory safety thing D
offers.
I understand. I think D should introduce simple optimizations to
remove some array bound tests safely.
Recently one of my enhancement requests on this was implemented
and merged, it will be present in 2.064.
And I have other simple suggestions:
http://d.puremagic.com/issues/show_bug.cgi?id=10685
There are some more refined ideas here, that need more
implementation efforts:
http://ssw.jku.at/Research/Papers/Wuerthinger07/Wuerthinger07.pdf
More info:
https://wikis.oracle.com/display/HotSpotInternals/RangeCheckElimination
Bye,
bearophile