View Full Version : simple increment benchmark
bobdole369
09-23-2006, 08:52 PM
apologies if its kludgy or just plain wrong, I'm still quite the novice. This code performs increments until the difference in the system timer equals 1000ms (one second). Repeats 5 times, output is the number of the cycle and the number reached during iteration. Could be a simple benchmark. All comments welcome.
#include "console"
func iterate(j$)
k$=0;
while(k$<j$)
i$=0;
t$=tick;
while(tick-t$<=1000)
i$=i$+1;
end;
WriteLn(i$);
k$=k$+1;
WriteLn(k$);
end;
end;
func WinMain
i$ = 0;
initConsole;
showconsole;
iterate(5);
return(true);
end;
bobdole369
09-23-2006, 08:58 PM
Output on Dell Axim 51v (624mhz on "auto")
300140
1
300835
2
302816
3
303139
4
300621
5
approx 300k ops/second?
Same code with setting on "power saving" 208mhz
Welcome to the PPL Console
97248
1
98537
2
97719
3
98005
4
97401
5
Looks like 1/3rding the cpu speed also 1/3rds the results. Excellent.
bobdole369
09-23-2006, 09:02 PM
changing the code to use ++ instead of i$=i$+1.
377947
1
382197
2
380411
3
376494
4
378772
5
20% increase...
kornalius
09-23-2006, 10:50 PM
Check the following, we've done this test before but it's good to try to do it yourself. Pratice is the best way to learn a new language. Keep up the good work.
http://www.pocketmatrix.com/forums/viewtopic.php?t=18573
MagNet
09-24-2006, 01:51 PM
What does it do actually?
kornalius
09-24-2006, 03:44 PM
It checks to see how many operations PPL can do in one second if I am not mistaken. It's a pretty good tests to compare different interpreter speeds.
MagNet
09-24-2006, 08:54 PM
Oh, cool.
mmtbb
09-27-2006, 06:59 PM
I've tested this stuff to nausium. PPL is very optimized. The real truth is, programs like NS Basic at their simplest form are close to the speed of PPL. However, if you add any extra code, the speed suffers, BAD! I have gutted the PPL benchmark test to the absolute fastest it can be(without PASM). I then compared it to the normal benchmark code. It is still very similar, meaning that even when taxed, PPL still delivers high speed.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.