6502 Speed Tests
The Master Reference Manual makes the claim on page A.4 that, "the internal 65C102 Co-processor option effectively performs the same function as an externally-connected BBC Microcomputer system 6502 Second Processor, though the co-processor is much faster." I thought I would test out this claim by running some speed tests on various combinations of Beebs and co-processors and second processors.
So, one Sunday morning during "The Archers" omnibus, I ran two tests - a counting test and a graphics test - and I have put the fascinating results below.
It's been such a long time since I did this that I can't remember when it was - it could have been as long ago as 2004. I have had quite a few expressions of interest since I first put this page here. Whilst I'm glad of that, I think it's unlikely that I am going to revisit the speed test thing in the foreseeable future, either to add more machines to the test sample or to use more scientific test routines.
So, what you see is all you're likely to get, but please enjoy it anyway!
Test A - Counting Test
To test the speed of the 6502, I ran the following simple counting programme which prints out numbers up to 10,000:
10REM 6502 Test A - Counting |
20TIME=0 |
30MODE7 |
40FORA=1TO10000 |
50PRINTA |
60NEXT |
70PRINTTIME |
I saved the programme on my Econet to make sure exactly the same version was used on all the machines I tried. I ran the test three times on each machine to iron out any variations in execution speed. The results were as follows:
Machine | Test 1 | Test 2 | Test 3 |
BBC Master 128 | 106.56s | 106.51s | 106.52s |
BBC Model B | 111.23s | 111.21s | 111.21s |
BBC Master 128 with MOS 3.50 | 78.50s | 78.47s | 78.38s |
BBC Master 128 with 65C102 co-processor | 39.36s | 39.34s | 39.35s |
BBC Master 128 with 65C102 co-pro using 6502 Second Processor | 47.51s | 47.51s | 47.51s |
BBC Model B with 6502 Second Processor | 51.37s | 51.37s | 51.37s |
BBC Master 128 with MOS 3.50 and 6502 Second Processor | 40.28s | 40.25s | 40.26s |
BBC Master 128 with 6502 Second Processor | 47.53s | 47.53s | 47.52s |
As expected, the fastest machine was the Master Turbo, ie. the Master 128 with the internal 65C102 co-processor. The poor old BBC Model B on its own took almost three times as long and was almost 4 seconds slower than an unexpanded Master 128.
The most surprising result was the Master 128 with the MOS 3.50 - it was almost 30 seconds faster than the Master with MOS 3.20 and just a second slower than the Master Turbo when I attached the Second Processor to it. I would like to try this out with the internal co-processor but this would involve a lot of dismantling.
Test B - Graphics Test
At first I wanted to try out a floodfill on all the different machines until I remembered that PLOT 133 has no effect on the BBC Model B. Instead I opted for some triangles as follows:
10REM 6502 Test B - Graphics |
20TIME=0 |
30MODE1 |
40FORA=1TO20 |
50MOVE0,0 |
60MOVE1279,0 |
70GCOL0,2 |
80PLOT85,600,1023 |
90CLG |
100NEXT |
110PRINTTIME |
Again, I put the programme on the net so that each machine could pick up exactly the same version. The results this time were as follows:
Machine | Test 1 | Test 2 | Test 3 |
BBC Master 128 | 16.20s | 16.19s | 16.19s |
BBC Model B | 19.37s | 19.36s | 19.38s |
BBC Master 128 with MOS 3.50 | 16.85s | 16.85s | 16.86s |
BBC Master 128 with 65C102 co-processor | 16.10s | 16.10s | 16.10s |
BBC Master 128 with 65C102 co-pro using 6502 Second Processor | 16.10s | 16.10s | 16.10s |
BBC Model B with 6502 Second Processor | 19.30s | 19.30s | 19.30s |
BBC Master 128 with MOS 3.50 and 6502 Second Processor | 16.16s | 16.17s | 16.18s |
BBC Master 128 with 6502 Second Processor | 16.12s | 16.11s | 16.11s |
Here, the claim that the internal co-processor is much faster than the external Tube is much less robust. The Master Turbo is the fastest machine again but using the external Tube on the Turbo gives the same speed. It is only fractionally quicker than the Master 128 using the Second Processor and this difference may be accounted for by my use of different Second Processor units on the Master Turbo and the Master 128.
Certainly the oft-quoted claim that a second processor or co-processor doubles programme execution speed appears to be wide of the mark when it comes to graphics: there is very little difference in speed when the second processor is added.
The most surprising result again is the performance of the Master 128 with MOS 3.50 - this time because it is slower than the standard Master 128. This is quite surprising when you think that the graphics drawing routines were recoded for MOS 3.50 to make them faster!