2 ms·
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.
by WalterBright 4y ago
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.
- pjmlp 4y agoExactly, 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.