5 ms·
Great points, plus from the puff readme: "In Rust, integer overflow is checked at run time in debug mode and silently ignored in release mode by default, as the
by yaantc 9y ago
Great points, plus from the puff readme: "In Rust, integer overflow is checked at run time in debug mode and silently ignored in release mode by default, as the run time performance penalty was deemed too great.". With puff, it's statically checked. I haven't delved into puff's details, but to support as many environment as possible in an easy way today, a DSL generating C seems a pragmatic decision.
- steveklabnik 9y agoSmall note here, we left the spec broad enough that if the runtime checks get cheap enough, we can do them in release mode as well.
- tveita 9y agoBy default, but it is possible to enable integer overflow for release builds with "-C overflow-checks".