[OT] The Usual Arithmetic Confusions

Elronnd elronnd at elronnd.net
Mon Jan 31 05:06:00 UTC 2022

On Saturday, 29 January 2022 at 10:39:10 UTC, Ola Fosheim Grøstad 
> As for practical problems: In C++ you can still enable signed 
> overflow checks. In D you cannot even do that, because in D all 
> integer operations are defined to be modular.
> Interestingly, the main complaint about modular arithmetics in 
> C++ is not about correctness however, but about poor 
> optimizations.

I don't buy this, even for a moment, and challenge anyone to 
demonstrate a significant (say, >5%) change in overall 
performance for a non-trivial c or c++ program from using -fwrapv.

More information about the Digitalmars-d mailing list