Evolution: the meaning of 4 and 5 GL. But a High Level Programming Lenguaje NEVER will be as FAST and SMALL as ASSEMBLER Lenguaje, by many reasons. So We are Clarion Programmers: a 4 GL (Dunno if still being 3 GL) we are not responsable for the Optimization of ASSEMBLER code that finally generate Clarion in the Exe's, but for the way we use the High Lenguaje instructions.
So I make some Testing in find the Faster instruccion in CONDITIONAL STATEMENT EXECUTION ESTRUCTURES:IF, CASE, EXECUTE, CHOOSE, INLIST. These are all That I know by now.
The BenchMark is base on a 10 Options to look for (All falses), and finally select an 11 Option when there's no matching values. All inclosed in a 10,000,000 Times LOOP
CheckinTime# = CLOCK() TRUELIES# = 69 LOOP 10000000 TIMES TRUELIES# = CHOOSE(TRUELIES#,1,2,3,4,5,6,7,8,9,10,96) END MESSAGE('Holding: ' & CLOCK()-CheckinTime# & ' Cent/Second','First Down !!!!!')
CheckinTime# = CLOCK() TRUELIES# = 69 LOOP 10000000 TIMES TRUELIES# = INLIST(TRUELIES#,'1','2','3','4','5','6','7','8','9','10') IF TRUELIES# = FALSE TRUELIES# = 96 END END MESSAGE('Holding: ' & CLOCK()-CheckinTime# & ' Cent/Second','First Down !!!!!')
STATS: Time is in Hundredths of a Sec. Test was made in a Pentium III, 256 RAM & NT 4.0 WorkStation SP 6a, Using C55f ABC. (**** The Small, the Better ****)
IF STATEMENT: -> 35 CASE STATEMENT: -> 33 EXECUTE STATEMENT: -> 36 CHOOSE STATEMENT: -> 8 INLIST STATEMENT: -> 1619
Well, at least you're programming a FAST requiring App. like Images and Data process, the Time you save by choosing the CHOOSE statement is not trascendental matters. Finnally the way your CODE LOOKS LIKE is order to be the easiest understanding by others or to be corrected by yourself after a long time periods, is the Conditional Statement that MUST TO BE CHOOSEN.