[DUG] Curious re efficiency of using in [set of integer]
Tech Benner
tech at benner.nz
Mon Aug 15 21:09:19 NZST 2022
Hi Rohit,
Could that same operation be affected by any optimisation?
Perhaps change the integer for each of the 10,000 ops.
I'm not sure but I've been caught out before with such things.
Cheers
Gary
On 15/08/2022 6:00 pm, Rohit Gupta wrote:
> 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.
>
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post:delphi at listserver.123.net.nz
> Admin:http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email todelphi-request at listserver.123.net.nz with Subject: unsubscribe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20220815/bed09015/attachment.html
More information about the Delphi
mailing list