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

Walter Bright newshound2 at digitalmars.com
Wed Mar 31 05:25:48 UTC 2021


On 3/30/2021 10:06 PM, Elronnd wrote:
> On Wednesday, 31 March 2021 at 04:59:08 UTC, Walter Bright wrote:
>> * should be:
>>
>>     lea    eax,1[eax + edi]
> 
> The lea is the exact same length as the sequence of moves, and may be harder to 
> decode.  I fail to see how that's a win.

It's a win because it uses the address decoder logic which is separate from the 
arithmetic logic unit. This enables it to be done in parallel with the ALU.

Although not relevant for this particular example, it also doesn't need another 
register for the intermediate value.


More information about the Digitalmars-d mailing list