As experience has shown, bounds checking is needed in the release builds, because those array overflows are only discovered by hackers in the released software.
D compilers allow that to be turned off, but it's only appropriate when:
1. evaluating how much the checking costs in runtime performance
Exactly, as any sane systems programming language. :)
I always force enable bounds checking on C++ code, never had a performance issue where the real culprit wasn't something else, wrong algorithm or data structure for the problem at hand.
Comments
As experience has shown, bounds checking is needed in the release builds, because those array overflows are only discovered by hackers in the released software.
D compilers allow that to be turned off, but it's only appropriate when:
1. evaluating how much the checking costs in runtime performance
2. doing competitive benchmarking
Otherwise, it should always be on.
Exactly, as any sane systems programming language. :)
I always force enable bounds checking on C++ code, never had a performance issue where the real culprit wasn't something else, wrong algorithm or data structure for the problem at hand.