Time to move std.experimental.checkedint to std.checkedint ?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Mar 31 05:08:29 UTC 2021


On 3/31/21 12:28 AM, Elronnd wrote:
> On Saturday, 27 March 2021 at 03:25:04 UTC, Walter Bright wrote:
>> 4. fast integer arithmetic is fundamental to fast code, not a mere 
>> micro-optimization. Who wants an overflow check on every pointer 
>> increment?
> 
> Dan Luu measures overflow checks as having an overall 1% performance 
> impact for numeric-heavy c code. 
> (https://danluu.com/integer-overflow/).  The code size impact is also 
> very small, ~3%.
> 
> This isn't 'speculation', it's actual measurement.

Bit surprised about how you put it. Are you sure you represent what the 
article says? I skimmed the article just now and... 1% is literally not 
found in the text, and 3% is a "guesstimate" per the author. The actual 
measurements show much larger margins, closer to tsbockman's.


More information about the Digitalmars-d mailing list