Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Compiler Speed Trials
#76
Code:
                                                                          BM7      BM8                          BMDRAW
Sinclair                                                                  87.44    23.30                         80.18
ZIP 1 .5                                                                   0.46
ZX Basic 1.26 -O3                                                          2.12    20.78
ZX Basic 1.26-r1603 -O3                                                    0.94    20.78  (17.14  with fSin)
ZX Basic 1.2.8-r2153 -O3                                                   1.36    29.06  (24.18  with fSin)
ZX Basic 1.2.8-s644 -O3                                                    1.34    29.02  (24.22  with fSin)     30.42
ZX Basic 1.2.8-s682 -O3                                                    0.88    20.56  (16.94  with fSin)     21.14
ZX Basic 1.2.8-s696 -O3                                                    0.90    20.60  (16.98  with fSin)     21.18
ZX Basic 1.2.8-s758 -O3                                                    0.90    20.76  (17.10  with fSin)     21.32
ZX Basic 1.2.9-s815 -O3                                                    0.90    20.54  (16.92  with fSin)     21.08
ZX Basic 1.3.0-s971 -O3                                                    0.90    20.80  (17.16  with fSin)     21.40
ZX Basic 1.3.0-s1121 -O3                                                   0.898   20.818 (17.200 with fSin)     21.40
ZX Basic 1.4.0-s1779 -O3                                                   0.892   20.628 (17.420 with fSin)     21.22
ZX Basic 1.4.0-s1980 -O3                                                   0.884   20.818 (17.202 with fSin)     21.40
ZX Basic 1.8.3       -O3                                                   0.874   20.818 (17.192 with fSin)     21.40
ZX Basic 1.18.0-beta4 -O3                                                  1.088   23.02  (19.4   with fSin)     22.86


Some not insignificant speed reductions from the last major published test - now well over half as fast as the Zip compiler in the basic BM7 test.

(For the record, Full BM code is below)


Code:
#include "fSin.bas"
FUNCTION t() as uLong
asm
    DI
    LD DE,(23674)
    LD D,0
    LD HL,(23672)
    EI
end asm
end function


cls
DIM i as uInteger
DIM k,var,j as uByte
DIM time,endtime as uLong
LET k=5
LET i=2
let time =t()
goto start
'Choose which BM by uncommenting out start in the relevant benchmark.

subroutine:
return



REM BM7
'start:
label:
LET i=i+1
LET var=k/2*3+4-5
gosub subroutine
DIM M(5) as uInteger
FOR j=0 to 4
LET M(j)=i
NEXT j
IF i<1000 then GOTO label: END IF
goto finish





REM BM8
'start:
FOR i=1 to 100
result=i^2
result=ln(i)
result=Sin(i)
'result=fSin(i)
next i
goto finish








REM BM DRAW
'start:
for i=1 to 127
draw i,160
plot i,0
next i

OVER 1

for i=0 to 80
plot 0,i
draw 250,i
next i

OVER 2


for i = 1 to 80
circle 127,87,i
next i


OVER 3

for i = 10 to 18
plot 127,87
draw i,i,i
next i



finish:
endtime=t()


OVER 0


print "Start:";time;" End:";endtime
print (CAST (FLOAT,t())-time)/50; " Seconds"
print "Done!"
print at 23,0;M(1);k;i;var;result
Reply
#77
Ok. I suspect this is due to array accesses.
Can you check with version 1.17.3-final? (available in the official page).
---
Boriel
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)