http://apollo181.wixsite.com/apollo181/experiment4-cpu-benchmark
I finally finished the BM9 benchmarking program in assembly code. The results: completes in 64 seconds with the clock running at 12MHz. Compared with the APOLLO181 finishing at 56 seconds running at 3MHz. I can assume that if I lowered my clock speed to the same, it will run four times slower, putting it at a run time of 256 seconds. I expect this because a one-instruction CPU is going to be less efficient especially with each instruction taking 4 clock cycles just for instruction fetching. This is because of my 16-bit memory bus instead of the 8-bit memory bus like on the APOLLO181. Also, I made my algorithm operate on 16-bit numbers instead of 12-bits. (Which makes the divider take 16 loops instead of 12). So I imagine if I reduced the complexity of my system down, it would operate roughly in the same amount of time.
As that website points out, the BM9 program was traditionally run in BASIC with an interpreter which drastically slows the operation, so a direct comparison is difficult. I also output the prime numbers in hexadecimal - I didn't bother to convert to decimal. Other notes from the APOLLO181 website:
- CDC CYBER 171, a late-1970s mainframe-class supercomputer, which run "BM9" (in Basic) in only 5 seconds (ranked 1st)
- TRS-80 Pocket Computer, which painfully run "BM9" in 55830 seconds (ranked last)
- 45 seconds for the DEC PDP 11/70 (ranked 5th)
- IBM 3033 (1977) run BM9 in 10 seconds (ranked 2nd)
- The Apple II Plus (1979) equipped with MOS 6502 microprocessor run BM9 in 325 seconds (ranked 15th)
- APOLLO181 would rank 6th
- As is, my one-instruction CPU would rank about 11th running at 3MHz (TTL speeds) - still faster than any of the 6502 systems
So now, I have to think where I want to go next. I may come back around and work on the TTL design.
Here is a link to the paper which has all of the results:
http://www.mwigan.com/mrw/Pubs__ICT_and_its_Impacts_files/82%20MICSIG%20ACS1-25.pdf
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
Always good to have a benchmark! You might find that the conversion to decimal digits is a fair chunk of the work, if you tackle it some day.
Are you sure? yes | no