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

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Mar 31 04:26:28 UTC 2021


On 3/31/21 12:11 AM, tsbockman wrote:
> On Wednesday, 31 March 2021 at 03:30:00 UTC, Andrei Alexandrescu wrote:
>> On 3/30/21 1:09 PM, tsbockman wrote:
>>> So you're now dismissing Zig as slow because its feature set 
>>> surprised you? No real-world data is necessary? No need to understand 
>>> any of Zig's relevant optimizations or options?
>>
>> Instead of passing the burden of proof back and forth, some evidence 
>> would be welcome.
> 
> I already posted both some Zig benchmark results of my own, and some 
> C/C++ results from the paper you linked earlier. You just missed them, I 
> guess:
> 
> https://forum.dlang.org/post/ghcnkevthguciupexeyu@forum.dlang.org
> https://forum.dlang.org/post/rnotyrxmczbdvxtalarf@forum.dlang.org
> 
> Oversimplified: the extra time required in these tests ranged from less 
> than 0.1% up to 14%, depending on the application.

Thanks. This is in line with expectations.

> Also, the Zig checked binaries are actually slightly smaller than the 
> unchecked binaries for some reason.

That's surprising so some investigation would be in order. From what I 
tried on godbolt the generated code is strictly larger if it uses checks.

FWIW I just tested -fwrapv and -ftrapv. The former does nothing discernible:

https://godbolt.org/z/ErMoeKnxK

The latter generates one function call per primitive operation, which is 
sure to not win any contests:

https://godbolt.org/z/ahErY3zKn


More information about the Digitalmars-d mailing list