[quote="GaBuZoMeu"]A question about execution speed comparisons [url]http://forum.6502.org/viewtopic.php?f=5&p=60986#p60969[/url] causes me to present a table where I have noted the execution speed of various computers running a simple program. In order not to stress the original topic I moved to this place.
[code] B A S I C - B E N C H M A R K (from BASBENCH.TAB, 28.08.93)
=============================
┌───────────────────┬──────────────────────────────╥─────────────────────┬────────────────────────────┐
│ EINGABE │ ERGEBNISSE ║ EINGABE │ ERGEBNISSE │
│A: 1000 , 20 │ 907 , 887 , 20 ║ D: 32000 , 50 │ 19661 , 19609 , 52│
│B: 2000 , 30 │ 1361 , 1327 , 34 ║ E: 32000 , 70 │ 31469 , 31397 , 72│
│C: 9999 , 35 │ 9587 , 9551 , 36 ║ F: 500000 , 100 │ 370373 , 370261 , 112│
└───────────────────┴──────────────────────────────╨─────────────────────┴────────────────────────────┘
Using modulo instead of (C%\D%)*D% was the last step:
[code]1 REM Basic-Bench á la SYM etc.
2 REM *** Integerversion + Modulofunktion ***
10 ZS% = 3: INPUT A%,B%
20 FOR C% = 3 TO A% STEP 2
30 FOR D% = 3 TO SQR(C%) STEP 2
40 IF C% MOD D% = 0 THEN 80
50 NEXT D%
60 IF C%- ZS% >= B% THEN PRINT C%,ZS%,C%-ZS%: GOTO 10
70 ZS% = C%
80 NEXT C%
90 PRINT "keine Lösung gefunden !": GOTO 10
Cheers
Arne[/quote]
Atari 800 & 800XL:
Straight port of above code into 1983 OSS Action, typed in, compiled and ran on-cartridge:
Results in frames (@59.92 frames/sec), and Antic DMA=OFF (max. 6502 cycles):
Test 1: 1.2850 secs (77 frames)
Test 2: 2.2196 secs (133 frames)
Test 3: 32.0761 secs (1922 frames)
Test 4: 85.8812 secs (5146 frames)
Could have effortlessly attained those results 38 years ago...