Speed Test
Most embedded interpreters are dreadfully slow, performing only a few thousand eight bit operations per second. The EZSBC1 performs at least 32 bit arithmetic and does full 64-bit floating point when it detects floating point is required. Here is a program that performs some loops to measure actual performance.
PRINT "Test Execution speed"
PRINT ""
'Gettick increments 10,000 per second
StartTime=GETTICK
FOR i= 1 TO 100000
NEXT i
Time=(GETTICK-StartTime)/10000
PRINT "Empty Loop 100,000 iterations ", Time, " seconds."
PRINT 200000/Time, " instructions per seconnd."
FOR i= 1 TO 100000
x=x+i
NEXT i
Time=(GETTICK-StartTime)/10000
PRINT""
PRINT "Addition 100,000 iterations ", Time, " seconds."
PRINT 300000/Time, " instructions per second"
FOR i= 1 TO 100000
x=x*i
NEXT i
Time=(GETTICK-StartTime)/10000
PRINT""
PRINT "Multiplication 100,000 iterations ", Time, " seconds."
PRINT 300000/Time, " instructions per second"
FOR i= 1 TO 100000
x=SIN(i)
NEXT i
Time=(GETTICK-StartTime)/10000
PRINT""
PRINT "Sinus function 100,000 iterations ", Time, " seconds."
PRINT 300000/Time, " instructions per second"
END
Download
PRINT "Test Execution speed"
PRINT ""
'Gettick increments 10,000 per second
StartTime=GETTICK
FOR i= 1 TO 100000
NEXT i
Time=(GETTICK-StartTime)/10000
PRINT "Empty Loop 100,000 iterations ", Time, " seconds."
PRINT 200000/Time, " instructions per seconnd."
FOR i= 1 TO 100000
x=x+i
NEXT i
Time=(GETTICK-StartTime)/10000
PRINT""
PRINT "Addition 100,000 iterations ", Time, " seconds."
PRINT 300000/Time, " instructions per second"
FOR i= 1 TO 100000
x=x*i
NEXT i
Time=(GETTICK-StartTime)/10000
PRINT""
PRINT "Multiplication 100,000 iterations ", Time, " seconds."
PRINT 300000/Time, " instructions per second"
FOR i= 1 TO 100000
x=SIN(i)
NEXT i
Time=(GETTICK-StartTime)/10000
PRINT""
PRINT "Sinus function 100,000 iterations ", Time, " seconds."
PRINT 300000/Time, " instructions per second"
END
Download
Screen Capture of results
Below is a screen capture of the actual results.