Y'all ready for this?


Author Message
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 2003
Posted: 11:55am 23 May 2026      

  Quote  
Note:
1) Not overclocked
2) Times are for all 1000 iterations

BM1:
2040: 0.383 msec
2350: 0.277 msec

BM2:
2040: 0.332 msec
2350: 0.230 msec

BM3:
2040: 0.859 msec
2350: 0.523 msec

BM4:
2040: 1.283 msec
2350: 0.402 msec

BM5:
2040: 1.362 msec
2350: 0.486 msec

BM6:
2040: 3.111 msec
2350: 1.584 msec

BM7:
2040: 3.721 msec
2350: 1.957 msec

BM8:
2040: 564.388 msec
2350: 95.297 msec

#define include_trig
#include <AB_Math.bas>


sub printTime (usec)
   dim flt_usec as single
   
   if usec <1000 then
       Print "0.";(usec);" msec"
   Else    
       flt_usec = usec / 1000
       print flt_usec;" msec"
   endif
   print
endsub


Main:
Print "ARMbasic Benchmark tests"
Print " "

Print "Benchmark 1"
A=Timer
For j = 1 To 1000
Next j
printTime(Timer-A)

Print "Benchmark 2"
A=Timer
j =j0
BM2:
j = j+1
If j < 1000 then GoTo BM2
printTime(Timer-A)

Print "Benchmark 3"
A=Timer
j = 0
BM3:
j = j+1
aa = j/j*j+j-j
If j < 1000 then GoTo BM3
printTime(Timer-A)

Print "Benchmark 4"
A=Timer
j = 0
BM4:
j = j+1
aa = j/2*3+4-5
If j < 1000 then GoTo BM4
printTime(Timer-A)

Print "Benchmark 5"
A=Timer
j = 0
BM5:
j = j+1
m = j/2*3+4-5
Gosub fourthou
If j < 1000 then GoTo BM5
printTime(Timer-A)

Print "Benchmark 6"
A=Timer
j = 0
dim ray(5)
BM6:
j = j+1
m = j/2*3+4-5
Gosub fourthou
For q = 1 TO 5
Next q
If j < 1000 then GoTo BM6
printTime(Timer-A)

Print "Benchmark 7"
A=Timer
j = 0
dim ray2(5)
BM7:
j = j+1
m = j/2*3+4-5
Gosub fourthou
For q = 1 TO 5
ray2(q) = m
Next q
If j < 1000 then GoTo BM7
printTime(Timer-A)

Print "Benchmark 8"
A=Timer
j = 0
BM8:
j = j+1
m = pow(j,2)
blog = LOG(j)
csin = SIN(j)
If j < 1000 then GoTo BM8
printTime(Timer-A)

End

fourthou:
RETURN



The label "main:" wasn't mentioned in the documentation and if you don't have it, the compiler gets all upset.