3 ms·
> Runtime error checks would incur performance penalties Which is why in rust, there are many runtime checks done in debug builds but not in release builds. (I
by thayne 7y ago
> Runtime error checks would incur performance penalties
Which is why in rust, there are many runtime checks done in debug builds but not in release builds. (Including checking for wraparound and bounds checks).
The idea being that automated tests should catch the errors, assuming you wrote good tests.
- steveklabnik 7y agoBounds checks are absolutely done in release builds. The optimizer is more likely to be able to remove ones that are irrelevant, but the checks are not turned off.