Time to move std.experimental.checkedint to std.checkedint ?
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Tue Mar 30 01:09:12 UTC 2021
On 3/29/21 3:25 PM, tsbockman wrote:
> On Monday, 29 March 2021 at 16:41:12 UTC, Andrei Alexandrescu wrote:
>> Checked code is larger, meaning more pressure on the scarce
>> I-cache in large programs - and that's not going to be visible
>> in microbenchmarks.
>
> This is true. But, at the moment I don't have an easy way to quantify
> the size of that effect.
You actually do. Apply the scientific method.
This is not a new idea, most definitely has been around for years and
people have tried a variety of things. So all you need to do is search
around scholar.google.com for papers on the topic and plain google.com
for other work on the topic. In a couple of minutes I found:
* https://dl.acm.org/doi/abs/10.1145/2743019 - relatively recent, quotes
a lot of other work. A good starting point.
* -ftrapv and -fwrapv flags in gcc:
https://gcc.gnu.org/onlinedocs/gcc-4.0.2/gcc/Code-Gen-Options.html. This
is not quite what you're looking for (they just crash the program on
overflow), but it's good to figure how much demand there is and how
people use those flags.
* How popular is automated/manual overflow check in systems languages?
Rust is a stickler for safety and it has explicit operations that check:
https://stackoverflow.com/questions/52646755/checking-for-integer-overflow-in-rust.
I couldn't find any proposal for C or C++. What does this lack of
evidence suggest? etc.
More information about the Digitalmars-d
mailing list