[DUG] Curious re efficiency of using in [set of integer]

Ross Levis ross at stationplaylist.com
Mon Aug 15 17:33:06 NZST 2022


Var Total: Integer;

 

If I want to test 2 or 3 values of an integer, I often use

 

if Total in [4,6] then ...

 

But is that more or less efficient for the CPU/ASM coding than

 

if (Total = 4) or (Total = 6) then ...

 

I'm not sure how to find out myself.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20220815/e0e7b0ae/attachment.html 


More information about the Delphi mailing list