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

Bruce Carneal bcarneal at gmail.com
Tue Mar 30 13:33:58 UTC 2021


On Tuesday, 30 March 2021 at 08:48:04 UTC, Max Haughton wrote:
> On Tuesday, 30 March 2021 at 06:43:04 UTC, Walter Bright wrote:
>> On 3/29/2021 10:53 PM, Max Samukha wrote:
>>> On Tuesday, 30 March 2021 at 00:02:54 UTC, H. S. Teoh wrote:
>>> 
>>>> 
[...]
>
> On the subject of run-time performance, checkedint can also do 
> things like Saturation arithmetic, which can be accelerated 
> using increasingly common native instructions (e.g. AVX on 
> Intel, AMD, and presumably Via also).
[...]
>
> (AVX instructions are also quite big so there is a the usual I$ 
> hit here too).

Some micro-architectures employ an L0/uOp cache, which can 
significantly alter the I$ performance calculus within loops.  To 
confidently identify an I$ performance bottleneck I think you'd 
need to use perf analysis tools. IIRC Max recommended this at 
Beerconf.

Side note: the checkedint code sure looks nice.  It's a very 
readable example of the leverage D affords.



More information about the Digitalmars-d mailing list