Page 1 of 1

Timing statements

Posted: Wed Oct 26, 2016 4:47 pm
by basicchip
>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

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