Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 01:17 06 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : speed tests

     Page 2 of 2    
Author Message
isochronic
Guru

Joined: 21/01/2012
Location: Australia
Posts: 689
Posted: 07:30pm 24 Jun 2017
Copy link to clipboard 
Print this post

!@#$%^!!!!
There is no hope...it is back to Basic school for me..sob..
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1133
Posted: 07:58pm 24 Jun 2017
Copy link to clipboard 
Print this post

  chronic said   !@#$%^!!!!
There is no hope...it is back to Basic school for me..sob..




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
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2290
Posted: 08:14pm 24 Jun 2017
Copy link to clipboard 
Print this post

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 :-)Edited by robert.rozee 2017-06-26
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 10:51pm 24 Jun 2017
Copy link to clipboard 
Print this post

  MicroBlocks said   Anything that contains a PRINT statement is not measuring the speed of the processor but the speed of the output device.


The 'timed' element contains no PRINTing. The printing comes at the end and is there to give further 'info' about the timed result
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1133
Posted: 01:43am 25 Jun 2017
Copy link to clipboard 
Print this post

Hi Robert,
  robert.rozee said   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 :-)

No. Please read again:
  Quote  MMBasic needs for the first 95 prime numbers (highest = 503, W=95)
including printing 0.376 seconds.

My last post is addressed to chronic.


BUT:
With exactly your code I get significant different results.

CPU 40:
  Quote   4.956 seconds

48122 statements
19747 lines

9709.85 statements per second
3984.46 lines per second


CPU 48
  Quote   4.128 seconds

48122 statements
19747 lines

11657.5 statements per second
4783.67 lines per second


Any idea why? I'm using MMBasic 5.1 (MX170/28).

Michael
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 02:14am 25 Jun 2017
Copy link to clipboard 
Print this post

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? . . . .

WWEdited by WhiteWizzard 2017-06-26
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
isochronic
Guru

Joined: 21/01/2012
Location: Australia
Posts: 689
Posted: 03:43am 25 Jun 2017
Copy link to clipboard 
Print this post

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: Germany
Posts: 1133
Posted: 04:31am 25 Jun 2017
Copy link to clipboard 
Print this post

  chronic said   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.

Yes! That seems to be plausible.
(I think the 500th is 3581. 3571 = 499th. But that's not important.)

Regards

 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1421
Posted: 09:45am 25 Jun 2017
Copy link to clipboard 
Print this post

  WhiteWizzard said  
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


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 Kingdom
Posts: 2794
Posted: 09:58am 25 Jun 2017
Copy link to clipboard 
Print this post

  CircuitGizmos said   Could it be that what is supposed to be the default of 252 is actually a higher number?


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 . . .

For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
isochronic
Guru

Joined: 21/01/2012
Location: Australia
Posts: 689
Posted: 03:07pm 25 Jun 2017
Copy link to clipboard 
Print this post

  Quote  3571 = 499th.

The websites listing them include "2" so I did as well
 
VK2MCT
Senior Member

Joined: 30/03/2012
Location: Australia
Posts: 120
Posted: 05:10pm 25 Jun 2017
Copy link to clipboard 
Print this post

Colour Maximite
MX795 48MHz
3.524

John.
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1421
Posted: 05:54am 26 Jun 2017
Copy link to clipboard 
Print this post

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
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024