3 ms·
Sure, but the post I replied to claimed bounds check issues were entirely avoidable at compile time
by HideousKojima 1y ago
Sure, but the post I replied to claimed bounds check issues were entirely avoidable at compile time
- StopDisinfo910 1y agoBound checks are entirely avoidable if you can prove that all your calls are within bounds - this being the key part of my comment. If you can’t, you just rewrite your code so you can because your code is not safe otherwise and safe code is what we are discussing here. Note that all calls can trivially be made provably within bounds by explicitly bound checking yourself and providing an alternate path for out of bound calls which obviously doesn’t improve performances compared to bound checks inserted by the compiler but at least save you a panic in the worst case scenario.