[DUG] Curious re efficiency of using in [set of integer]
Rohit Gupta
rohitguptanz at gmail.com
Mon Aug 15 18:00:47 NZST 2022
Just put it in a loop of 10k and time it.
But honestly, does it really matter?
Regards
Rohit
15/08/2022 17:34:14 Ross Levis <ross at stationplaylist.com>:
> 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/6c051033/attachment-0001.html
More information about the Delphi
mailing list