![]() |
Forum Index : Microcontroller and PC projects : speed tests
![]() ![]() |
|||||
Author | Message | ||||
isochronic Guru ![]() Joined: 21/01/2012 Location: AustraliaPosts: 689 |
!@#$%^!!!! ![]() There is no hope...it is back to Basic school for me..sob.. ![]() |
||||
twofingers Guru ![]() Joined: 02/06/2014 Location: GermanyPosts: 1530 |
![]() ![]() I think we all can learn from mistakes. BTW: MMBasic needs for the first 95 prime numbers (highest = 503, W=95) including printing 0.376 seconds. (MMBaqsic 5.1, MM2/28pin, CPU 48, 115200 Baud) Sieve of Eratosthenes Speed Test 0.348 seconds 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 239 241 251 257 263 269 271 277 281 283 293 307 311 313 317 331 337 347 349 353 359 367 373 379 383 389 397 401 409 419 421 431 433 439 443 449 457 461 463 467 479 487 491 499 503 0.028 seconds 0.376 seconds causality ≠ correlation ≠ coincidence |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2400 |
i'm running micromite basic version 5.04.04 on an MX170 and getting around 5.4 seconds. are you saying that version 5.1 completes the same calculations in just 0.376 seconds?! cheers, rob :-) |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2927 |
The 'timed' element contains no PRINTing. The printing comes at the end and is there to give further 'info' about the timed result ![]() |
||||
twofingers Guru ![]() Joined: 02/06/2014 Location: GermanyPosts: 1530 |
Hi Robert, No. Please read again: ![]() My last post is addressed to chronic. BUT: With exactly your code I get significant different results. ![]() CPU 40: CPU 48 Any idea why? I'm using MMBasic 5.1 (MX170/28). Michael causality ≠ correlation ≠ coincidence |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2927 |
Regarding timings on the Micromite(s). I have seen some strange things in the past where I copy someone's Timing Code (i.e. kid's, Rob's, others from the 80's); and I mainly see 'similar' results to match the trend. These differences can easily be explained by differences in silicon, temperature, voltage, etc. HOWEVER, my initial result (which can be very consistent) I then change CPU SPEED and see an increase or decrease in timing as expectected. BUT when I then go back to the original CPU SPEED, the timing is now different to the 'original' result, albeit now consistent with a new timing. The last example of this was with Rob's code posted at the top of this thread. It was an on MMX144 with CPU 252. Getting something like 0.933 constantly +/- 0.001. Then set to CPU 200 to compare, and it went (as expected) to something like 1.097 consistently. Then back to CPU 252, and went to 0.989 consistently. Reboots, power-downs, no matter what, it remained at the 0.989 figure and never got as low again as 0.933. Has anyone else seen this kind of behaviour? . . . . ![]() WW |
||||
isochronic Guru ![]() Joined: 21/01/2012 Location: AustraliaPosts: 689 |
BTW After, uh, adjustment, [ to produce the 500 or so primes 1 through 3571, ] mine takes about 3.5 seconds so that is similar enough. |
||||
twofingers Guru ![]() Joined: 02/06/2014 Location: GermanyPosts: 1530 |
Yes! That seems to be plausible. ![]() (I think the 500th is 3581. 3571 = 499th. But that's not important.) Regards causality ≠ correlation ≠ coincidence |
||||
CircuitGizmos![]() Guru ![]() Joined: 08/09/2011 Location: United StatesPosts: 1427 |
Could it be that what is supposed to be the default of 252 is actually a higher number? Have you tried reflashing BASIC on the chip? Would that get you back to 0.933? Micromites and Maximites! - Beginning Maximite |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2927 |
Good thinking - however, on the MMX, the default is 200. It has to be set manually to 252 which is what it just happened to be on when I first tried Rob's 'speed-test' code. Re-flashing is the next thing to see what happens - but note that I am not trying to get back to the 'faster' figure. I am just curious about why the timing 'increases' rather than reverting back to the 'previous' figure. Will try refreshing later and report back . . . |
||||
isochronic Guru ![]() Joined: 21/01/2012 Location: AustraliaPosts: 689 |
The websites listing them include "2" so I did as well |
||||
VK2MCT Senior Member ![]() Joined: 30/03/2012 Location: AustraliaPosts: 120 |
Colour Maximite MX795 48MHz 3.524 John. |
||||
CircuitGizmos![]() Guru ![]() Joined: 08/09/2011 Location: United StatesPosts: 1427 |
WW: I had a mishap with setting up a microcontroller a while back where what I was calculating for a clock was off by a factor of 2 because of a divider that the documentation wasn't clear about. If that were the case here, then what is supposed to be 252MHz would be 126MHz. Not saying that is what is happening, but this situation just reminded me of my experience. Micromites and Maximites! - Beginning Maximite |
||||
![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |