Saturday, May 16, 2020

About performance

As I move forward into a higher-level language implementation, 2 things immediately become evident:

  1. My Perl implementation of the CPU is atrociously slow...
  2. You really can't do much with 256 bytes of RAM...
So I decided to leave Perl aside for the time being and attempt an implementation of the Scott CPU in Go. So far the performance aspects look positive. On my laptop:

  • 10M function calls in Perl: 900ms
  • 10M function calls in Go: 15ms  
Moving to Go should definitely help with performance, and I also have made another decision: the Go implementation will have an architecture with a configurable number of bits.  All the different parts (Byte, Enabler, Register, Bus, ...) will be able to support a global configuration of 8 bits of more. 

Ideally, I will be able to select the number of bits that will give me enough RAM for what I want to do, along with am acceptable performance. 

I don't plan to increase the instruction set of the computer to more than 8 bits, but all the transport and part will be adapted to allow the use of more RAM.

No comments:

Post a Comment