CMM2 vs. PicoMite 2 Mio For-Next-Benchmark


Author Message
andreas

Senior Member

Joined: 07/12/2020
Location: Germany
Posts: 189
Posted: 03:14pm 26 Sep 2022      

Don't ask me what is going on here - this version does it in a second!

Can someone verify this? I'm curious where the mistake is - but this seems to be too fast, isn't it?



' speed.bas - Laufzeitmessung
'
CLS
CONST Maxloop = 2000000        ' Anzahl der Loops

DIM Laufzeit AS FLOAT = 0.0    ' in Sekunden
DIM a AS INTEGER = 0           ' Dummy
DIM T1 AS INTEGER = 0
DIM T2 AS INTEGER = 0          ' Timer in Millisekunden

PRINT
PRINT "Messung von ";Maxloop%;" For-Next - Statements"
PRINT "------------------------------------------"
PRINT

T1 = timer

for a = 1 to Maxloop:next

T2 = timer

Laufzeit = (T2 - T1)/1000.0

PRINT "Pro Sekunde:    ";INT(Maxloop/Laufzeit);" Iterationen"
PRINT "Gesamtlaufzeit: ";Laufzeit;" Sekunden"
save image "cmm2.bmp"


The CMM2 is not "tuned" it simply runs @ 480MHz.
-andreas