Timing statements

Questions about the BASICtools and MakeItC
Post Reply
basicchip
Posts: 985
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA
Contact:

Timing statements

Post by basicchip » Wed Oct 26, 2016 4:47 pm

>from help line

>I got a general question on ArmBasic. Is there a significant Execution time difference between If elseif elseif and case statements?
>For example if I have 10 cases to be evaluated.

ARMbasic impliments case like an if-elseif. So there is no real performance difference (I think -- see below). In either way the case you expect should be first in the if or case.

To be sure, I use the compiler to measure statement times like --

Code: Select all

x=1000000
while x
  x=x-1
  ....< statements to be tested  >
loop
This will measure the actual time in execution. You can subtract the time of the while loop without any statements.



Post Reply