Time to move std.experimental.checkedint to std.checkedint ?
Walter Bright
newshound2 at digitalmars.com
Wed Mar 31 04:59:08 UTC 2021
On 3/30/2021 9:08 PM, Andrei Alexandrescu wrote:
> Not much to write home about. The jumps scale linearly with the number of
> primitive operations:
>
> https://godbolt.org/z/r3sj1T4hc
>
> That's not going to be a speed demon.
The ldc:
mov eax, edi
imul eax, eax
add eax, edi *
add eax, 1 *
ret
* should be:
lea eax,1[eax + edi]
Let's try dmd -O:
__D3lea6squareFiZi:
mov EDX,EAX
imul EAX,EAX
lea EAX,1[EAX][EDX]
ret
Woo-hoo!
More information about the Digitalmars-d
mailing list