I'm interested to see how the eMBee ONE compares performance-wise with the classic 8-bit computers from the 80s. I did a quick bit of Googling to find out the best way to benchmark old 8-bit computers, and found two interesting methods:
The 'N-queen' chess problem - website
10 CLEAR 20 R=8: X=0: S=0 30 DIM A(R) 40 IF X=R THEN GOTO 180 50 X=X+1 60 A(X)=R 70 S=S+1 80 Y=X 90 Y=Y-1 100 IF Y=0 THEN GOTO 40 110 T=A(X)-A(Y) 120 IF T=0 THEN GOTO 140 130 IF X-Y<>ABS(T) THEN GOTO 90 140 A(X)=A(X)-1 150 IF A(X)<>0 THEN GOTO 70 160 X=X-1 170 IF X<>0 THEN GOTO 140 180 PRINT S
This doesn't seem to use up too much memory as it was originally used to compare programmable calculators. Even my old CASIO FX-730P (an inspiration for this project) is listed with a completion time of 7 mins 0 secs. However it uses the 'ABS' command which isn't supported in ArduinoBASIC. So first things first, I had to implement ABS in eMBee BASIC. This is my first attempt at adding to the list of commands.
Once that was done, I just typed in the code above, and typed RUN with a stopwatch ready. Would it beat 7 minutes for the FX-730P calculator?
Er....yes. Result: 7 seconds! To be fair, the processor runs at 16MHz though, and this is a very efficient BASIC interpreter. But I wish I could tell my 13-year-old self that I've built a pocket computer that's 60 times faster than his!
Prime Sieve benchmark - website
10 W=500: DIM F(W): P=1: A=3 20 F(P)=A: P=P+1: IF P>W THEN STOP 30 A=A+2: X=1 40 S=A/F(X):IF S=INT(S) THEN GOTO 30 50 X=X+1:IF X<P AND F(X)*F(X)<=A THEN GOTO 40 60 GOTO 20
Simpler code that in theory would run on ArduinoBASIC, but results in a '10-Out of memory' error due to trying to create an array of 500 numbers in the first line! Time to beat here would have been 6 mins 28 seconds for the ZX Spectrum.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
Since this post, I've had to remove the 'ABS' command as it broke other commands! So you currently can't run the N-queens code on the eMBee ONE. Maybe that will change in the future.
Are you sure? yes | no