Lardo Boffin wrote: ↑Tue Oct 27, 2020 9:37 am
I ran the speed test on my Tatung Einstein TC01 using Z80 BBC BASIC:
Multiplied by 1.5 the figures are impressively close! Does the co-proc version gain a small advantage due to only doing language processing and no house keeping / handling interrupts etc.?
I don't think there will be any interrupt activity on the second processor during that test. Interrupts can be used as part of the tube transfers but, once loaded, that test runs entirely from RAM and sending characters over the tube to be printed does not use interrupts on the client (2nd proc).
We also need to be careful about parallelism when measuring performance. On the I/O processor, when one calls OSWRCH to write a character to the screen, the calling program then has to wait for the screen write to happen before OSWRCH returns. On the 2nd processor, OSWRCH just stuffs the character into a FIFO in the tube ULA and then the I/O processor will receive it, and print it, while the 2nd processor gets on with the next thing. Obviouly the FIFO has limited depth so sometimes OSWRCH will have to wait because the FIFO is full, but that's going to be less than 100% of the time.
For this benchmark, though, I don't think it makes any difference as the timed loops themselves don't generate output - the printing happens beween tests.
So back to the overhead of interrupts the BBC MOS uses interrupts extensively. Many of them only happen in response to things like typing keys, characters arriving from RS423/tape or being printed on the printer, but there is a regular timer interrupt, a VSYNC interrupt and end of ADC conversion that just happen every so often regardless unless dsabled.
But the real question for the comparison is what level of interrupt activity there is on the Einstein.