Jump to content

Photo

Monster 1951 machine vs $15 BBC micro:bit: Which computer won...


3 replies to this topic

#1 JamesD OFFLINE  

JamesD

    Quadrunner

  • 8,158 posts
  • Location:Flyover State

Posted Tue Mar 6, 2018 1:28 AM

"Monster 1951 machine vs $15 BBC micro:bit: Which computer won and by how much?"

"...
The BBC micro:bit didn't just beat the Witch, it crushed it, calculating some 6843 numbers in a Fibonacci sequence in 15 seconds, while the Witch managed just three.
..."

FWIW, an 80s 8 bit can do close to 500 using BASIC, but it will crash with an overflow error in less time than that unless your machine supports double precision variables.

https://www.techrepu...nd-by-how-much/



#2 JamesD OFFLINE  

JamesD

    Quadrunner

  • Topic Starter
  • 8,158 posts
  • Location:Flyover State

Posted Tue Mar 6, 2018 11:54 AM

Okay, the Visual BASIC code I used as a starter was wrong, but the article says the Apple II calculated 38 and the BBC Micro calculated 70.
I'm guessing they are using very large integers from assembly to avoid errors... which is the whole point of the benchmark.
BASIC cuts off the number of digits so it isn't really doing the same thing.  FWIW, it overflows at 185 on an MC-10 in 10 seconds.

Based on their numbers, it would require about a 14MHz 6502 to hit 500.  I think there were a few running that fast in the late 80s.
There definitely are now.

The 6803 and 6809 only have a 16 bit ADD and 8 bit ADC, as well as no instruction prefetch, so they may not perform as well as the 6502 on this.
The 6303 would do slightly better than the 6502 because it has an instruction prefetch, but it's a small amount.
The 6309 has 32 bit ADD and 16 bit ADC instructions as well as the instruction prefetch, so it might double the BBC number.
 


Edited by JamesD, Tue Mar 6, 2018 11:55 AM.


#3 JamesD OFFLINE  

JamesD

    Quadrunner

  • Topic Starter
  • 8,158 posts
  • Location:Flyover State

Posted Tue Mar 6, 2018 12:07 PM

Errors or not, timing the first 100 Fibonacci numbers would make another good BASIC benchmark.

10 X=0:A=1:B=0:C=0
11 REM C=Next, A=First, B=Second
20 CLS
30 INPUT"ENTER NUMBER OF SERIES";S
40 FORX=0TOS:IFX>1THENC=A+B:A=B:B=C:PRINTX,C;"  ";:NEXT:GOTO60
50 C=X:PRINTC;"  ";:NEXT
60 END



#4 JamesD OFFLINE  

JamesD

    Quadrunner

  • Topic Starter
  • 8,158 posts
  • Location:Flyover State

Posted Tue Mar 6, 2018 10:57 PM

 

Errors or not, timing the first 100 Fibonacci numbers would make another good BASIC benchmark.

10 X=0:A=1:B=0:C=0
11 REM C=Next, A=First, B=Second
20 CLS
30 INPUT"ENTER NUMBER OF SERIES";S
40 FORX=0TOS:IFX>1THENC=A+B:A=B:B=C:PRINTX,C;"  ";:NEXT:GOTO60
50 C=X:PRINTC;"  ";:NEXT
60 END

That was the version with a test to see what the last Fibonacci # was.  Remove the "X," part from the first print statement. 






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users