|
Forum Index : Microcontroller and PC projects : Ahl's simple benchmark
| Author | Message | ||||
| PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 1637 |
timer=0 for n=1 to 100 : a = n for i=1 to 10 a=sqr(a):r=r+rnd(1) next i for i=1 to 10 a=a^2: r=r+rnd(1) next i s=s+a: next n print abs(1010-s/5) print abs(1000-r) print timer ![]() Interesting to compare the PicoMite with the IBM PC compiled BASIC. Cray-1 appears to be ~5 X faster than PicoMite |
||||
| jwettroth Regular Member Joined: 02/08/2011 Location: United StatesPosts: 80 |
On MMBasic for DOS on 5 yr old I7 Desktop (3.3GHz IIRC)- I get the following- 6.821...e-13 6.696... 0 Do these values make sense? I guess the timer never got to make a tick. Does this mean I'm 10^6x faster than a Cray! Good fun- love this old stuff that compares Osborne's to Cray's. Edited 2025-11-14 04:09 by jwettroth John Wettroth |
||||
| toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 477 |
On a PicoCalc running WebMite 6.01.00 RC12 on a Pico 2W @ 252000 Hz, I get a runtime of 0.07 seconds. That makes it third in the list of computers right after the Amdahl. Amazing for a handheld! Edited 2025-11-14 04:09 by toml_12953 |
||||
| Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 5464 |
The timer in an IBM PC is not a ms timer. Not sure what Geoff uses, but it used to be a 16ms tick (60Hz video). On an i5 running MMB4L, I get 9ms (just a bit faster that the Cray-1). May be that the Cray-1 ran compiled code. Maybe Fortran. But it feels a bit like comparing home computers from the 80's to 60's mainframes. Volhout Edited 2025-11-14 05:46 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
| Sasquatch Guru Joined: 08/05/2020 Location: United StatesPosts: 378 |
Ahhh...Yes! Lots of "Memories" on that there list! It's also interesting that you can identify the version of basic by the "Accuracy" numbers. For example the Vic20, C64, AppleII and a few others all used a version of Microsoft Basic for 6502 with 40bit floating point (32bit mantissa + 8bit exponent) -Carl |
||||
| Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 5464 |
Phenix, The only thing I do not understand is the random column. You count up 1000 x 2 random numbers (between 0 and 1) and subtract 1000. But if it is true random 2000 numbers would not do it. AFAIK this number says nothing. On a RP2040 (that according to Peter has a true random generator) I get responses varying between 0 and 30 at successive runs. And that is the only thing that makes sense. In case you see the same response twice, you know it is not true random, but running a fixed algoritm. But then you need multiple values in the column Random. I know the ORIC 1 / ATMOS had such. Each run the sequence of random numbers would be the same. Volhout PicomiteVGA PETSCII ROBOTS |
||||
| vegipete Guru Joined: 29/01/2013 Location: CanadaPosts: 1148 |
The random numbers should be uniformly distributed over the range of (0,1] So the average should be 0.5 This is statistics, of course, so the larger the sample size, the better the average should be. Visit Vegipete's *Mite Library for cool programs. |
||||
| PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 1637 |
My limited understanding of this stuff simply had me wondering why we are expecting something consistent out of something "random". |
||||
| toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 477 |
In most BASICs, the distribution is [0,1) 0 is included but 1 isn't. |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |