General Category > Off topic

Amstrad CPC Machine code speed test

(1/2) > >>

ukmarkh:
We all know that the Amstrad CPC kicks the C64 and every 8bit Machine in regards to basic, thanks to Locomotive, but how does it perform running a 1000 prime number raw calculations test in machine code, talking directly to the hardware in comparison to the other 8bits?

Has anyone ever tried this or written code, maybe this is something Amstrad Action covered, but it would be great to know.

http://retro64.altervista.org/blog/home-computer-basic-performance-tests-some-benchmarks/


https://youtu.be/pxye-RbKFpY





Sent from my iPhone using Tapatalk

Urusergi:
 :picard: That code is very slow and ugly. Instead, this one is super optimized (7.21 sec  8) ):


--- Code: ---10 MODE 2:DEFINT a-y:ZONE 8:z=TIME:p=3:m=1000:DIM s(m+1):PRINT 2,
20 WHILE s(p):p=p+2:WEND:FOR i=p TO m STEP p*2:s(i)=-1:NEXT:IF p<m THEN PRINT p,:GOTO 20 ELSE PRINT:PRINT(TIME-z)/300
--- End code ---

ukmarkh:

--- Quote from: Urusergi on 02:18, 23 April 18 --- :picard: That code is very slow and ugly. Instead, this one is super optimized (7.21 sec  8) ):


--- Code: ---10 MODE 2:DEFINT a-y:ZONE 8:z=TIME:p=3:m=1000:DIM s(m+1):PRINT 2,
20 WHILE s(p):p=p+2:WEND:FOR i=p TO m STEP p*2:s(i)=-1:NEXT:IF p<m THEN PRINT p,:GOTO 20 ELSE PRINT:PRINT(TIME-z)/300
--- End code ---

--- End quote ---

Hi, but we need to rule out optimum or ugly code and talk directly to the hardware otherwise optimisation might be used as an argument in the other camps. It’s purely an experiment, outside of basic.


Sent from my iPhone using Tapatalk

MaV:
litwr wrote a bunch of machine code programs for various platforms intended for speed comparisons.

Urusergi:

--- Quote from: ukmarkh on 09:41, 23 April 18 ---Hi, but we need to rule out optimum or ugly code and talk directly to the hardware otherwise optimisation might be used as an argument in the other camps. It’s purely an experiment, outside of basic.
--- End quote ---

Yes, I understand you correctly. I was trying to say that my code, apart from being much faster, is more convenient or easy to make an assembly implementation (additions & multiplications by 2)

Navigation

[0] Message Index

[#] Next page

Go to full version
Powered by SMFPacks Reactions Mod
Powered by SMFPacks Alerts Pro Mod
Powered by SMFPacks Mentions Pro Mod