Timing statements

Questions about the BASICtools and MakeItC
Post Reply
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL

Timing statements

Post 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.

Post Reply