|
|
|
|
|
by pjmlp
1297 days ago
|
|
Which only do bounds checking in debug builds, or when explicitly use the compiler switches to enable them in release builds, good luck trying to advocate for using at() everywhere instead of braces. Before C++ got the STL, all collections libraries shipped with compilers used to have bounds checking enabled by default, apparently that is too much performance loss for the standard library. Walter's proposal added bounds checking being used unless explicitly disabled, like in any sane systems language. |
|
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.