Lints, Condate and bugs
Walter Bright
newshound2 at digitalmars.com
Thu Oct 28 10:57:38 PDT 2010
bearophile wrote:
>> but what are the big issues with checking for overflows
>
> There are no big issues for checking for overflows.
Consider that every add instruction:
ADD EAX,3
becomes 2 instructions:
ADD EAX,3
JC overflow
and every:
LEA EAX,7[EBX*8][ECX]
becomes:
MOV EAX,EBX
IMUL EAX,3
JC overflow
ADD EAX,7
JC overflow
ADD EAX,ECX
JC overflow
This is not a small penalty. Adds, multiplies, and subtracts are the bread and
butter of what the executable code is.
More information about the Digitalmars-d
mailing list