The results are not as expected (but actually suit me!) and I am wondering if my test logic is bad.
Any comments?
Code: Select all
Structure myCallDef
adr.l
ad.l[10]
EndStructure
jmp.myCallDef
Procedure aa(va,vb)
c=va-vb
ProcedureReturn va-vb
EndProcedure
; expectations:
; 1. scalar var fastest as addr resolved outside loop. Actually worst.
; 2. @addr as resolved inside loop but no structure resolution
; 3. addr in structure.
; 4. addr in structure, in 'array' of items. - Is consistently best!
; 5. standard procedure call.
jmp\ad[0]=@aa()
jmp\adr=@aa()
k=@aa()
t=getTickCount_()
i=0
; uncomment line to test.
; Is this test logic flawed?
While getTickCount_()<t+500
; i+CallFunctionFast(jmp\ad[0],2,1) ; #1 thought @4 (10% up on std)
; i+CallFunctionFast(jmp\adr,2,1) ; #2 thought @3
; i+aa(2,1) ; #3 thought @5
; i+CallFunctionFast(@aa(),2,1) ; #4 thought @2 (5% down on std)
; i+CallFunctionFast(k,2,1) ; #5 thought @1
Wend
MessageRequester("RESULTS","Times done ="+Str(i),0)

