Hacker News new | ask | show | jobs
by glacia01 1315 days ago
>Just look at the performance costs of bounds-checking array access in C++ code.

If your compiler can prove you dont need bounds-checking it will remove the check and the performance would be the same. Hence, if your program has been proven to have no runtime errors you dont need them.

1 comments

> If your compiler can prove you dont need bounds-checking it will remove the check and the performance would be the same

and in practice that is a very big "if"