Array operation doesn't check array bounds
bearophile
bearophileHUGS at lycos.com
Sun Apr 3 05:25:53 PDT 2011
Simon:
> No it doesn't. D is supposed to be systems programming language.
> Unnecessary bounds checking would make array access too slow.
D has already array bounds, even to access single items. Array operations are bulk, so they need only one bound test, then they perform many operations without tests. So the bound time is often amortized, unless your arrays are very small. Otherwise you disable the tests with -release or -noboundscheck. I am rather sure Walter agrees about this.
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list