Here is some testings for subj:
For object testing I used:
And for the simple proc call:
Here are the results (on a ASUS A620):
Object calls : 188469 iterations
Simple proc calls: 336212 iterations (It almost two times faster
) (especially if you use that in game's WM_TIMER event)
For object testing I used:
- Code:
#class Tobj
public(
iter$
);
private nproc Create
iter$ = args$[0];
end;
public proc makeIter()
iter$++;
end;
#endclass
proc main
#object Tobj obj$(0);
t$ = Tick();
while ((Tick() - t$) < 10000)
obj.makeIter();
end;
showMessage(str(obj.iter$));
end;
And for the simple proc call:
- Code:
proc TestIter(i$)
i$++;
end;
proc main
i$ = 0;
t$ = Tick();
while ((Tick() - t$) <= 10000)
TestIter(&i$);
end;
showMessage(str(i$));
end;
Here are the results (on a ASUS A620):
Object calls : 188469 iterations
Simple proc calls: 336212 iterations (It almost two times faster