basic time for integer counts

BlitzMax Forums/BlitzMax Beginners Area/basic time for integer counts

rod54(Posted 2005) [#1]
I know this is a very basic program but I would like to see what kind of counts some of the power systems get

With program below and I know its not exact
but I figure even my poor old 1GHz AMD Athlon is
getting ~ 30 million integer operations a second.

couple lines of output is:


Below is code I used:
----------------------------------------------------------

Global a:Long = 0,count2:Long = 1000000

Print "Starting count to " + count2 + " " + CurrentTime$()
d


rod54(Posted 2005) [#2]
oops code messed up... how to you attach code to the post ??

anyway here is another try for the program

Global a:Long = 0,count2:Long = 1000000
print "Counting to " + count2 + " " + CurrentTime$()

while(1)
a = a + 1

If a = count2
Print "Count completed @ " + CurrentTime$()
count2 = count2 + 1000000 ' add 1 million to count2
print "Counting to " + count2 + " " + CurrentTime$()
a = 0
EndIf

Wend


PowerPC603(Posted 2005) [#3]
Here's a printout from your program on my system (for specs, see signature):

Counting to 1000000 17:15:09
Count completed @ 17:15:09
Counting to 2000000 17:15:09
Count completed @ 17:15:10
Counting to 3000000 17:15:10
Count completed @ 17:15:10
Counting to 4000000 17:15:10
Count completed @ 17:15:10
Counting to 5000000 17:15:10
Count completed @ 17:15:10
Counting to 6000000 17:15:10
Count completed @ 17:15:10
Counting to 7000000 17:15:10
Count completed @ 17:15:10
Counting to 8000000 17:15:10
Count completed @ 17:15:11
Counting to 9000000 17:15:11
Count completed @ 17:15:11
Counting to 10000000 17:15:11
Count completed @ 17:15:11
Counting to 11000000 17:15:11
Count completed @ 17:15:12
Counting to 12000000 17:15:12
Count completed @ 17:15:12
Counting to 13000000 17:15:12
Count completed @ 17:15:12
Counting to 14000000 17:15:12
Count completed @ 17:15:13
Counting to 15000000 17:15:13
Count completed @ 17:15:13
Counting to 16000000 17:15:13
Count completed @ 17:15:14
Counting to 17000000 17:15:14
Count completed @ 17:15:14
Counting to 18000000 17:15:14
Count completed @ 17:15:15
Counting to 19000000 17:15:15
Count completed @ 17:15:15
Counting to 20000000 17:15:15
Count completed @ 17:15:16
Counting to 21000000 17:15:16
Count completed @ 17:15:17
Counting to 22000000 17:15:17
Count completed @ 17:15:17
Counting to 23000000 17:15:17
Count completed @ 17:15:18
Counting to 24000000 17:15:18
Count completed @ 17:15:19
Counting to 25000000 17:15:19
Count completed @ 17:15:20
Counting to 26000000 17:15:20
Count completed @ 17:15:22
Counting to 27000000 17:15:22
Count completed @ 17:15:22
Counting to 28000000 17:15:22
Count completed @ 17:15:23
Counting to 29000000 17:15:23
Count completed @ 17:15:24
Counting to 30000000 17:15:24
Count completed @ 17:15:25
Counting to 31000000 17:15:25
Count completed @ 17:15:26
Counting to 32000000 17:15:26
Count completed @ 17:15:27
Counting to 33000000 17:15:27
Count completed @ 17:15:28
Counting to 34000000 17:15:28
Count completed @ 17:15:29
Counting to 35000000 17:15:29
Count completed @ 17:15:30
Counting to 36000000 17:15:30
Count completed @ 17:15:31
Counting to 37000000 17:15:31
Count completed @ 17:15:33
Counting to 38000000 17:15:33
Count completed @ 17:15:34
Counting to 39000000 17:15:34
Count completed @ 17:15:35
Counting to 40000000 17:15:35
Count completed @ 17:15:36
Counting to 41000000 17:15:36
Count completed @ 17:15:38
Counting to 42000000 17:15:38
Count completed @ 17:15:39
Counting to 43000000 17:15:39
Count completed @ 17:15:40
Counting to 44000000 17:15:40
Count completed @ 17:15:42
Counting to 45000000 17:15:42
Count completed @ 17:15:43
Counting to 46000000 17:15:43
Count completed @ 17:15:44
Counting to 47000000 17:15:44
Count completed @ 17:15:46
Counting to 48000000 17:15:46
Count completed @ 17:15:47
Counting to 49000000 17:15:47
Count completed @ 17:15:49
Counting to 50000000 17:15:49
Count completed @ 17:15:51
Counting to 51000000 17:15:51
Count completed @ 17:15:52
Counting to 52000000 17:15:52
Count completed @ 17:15:54
Counting to 53000000 17:15:54
Count completed @ 17:15:56
Counting to 54000000 17:15:56
Count completed @ 17:15:57
Counting to 55000000 17:15:57
Count completed @ 17:15:59
Counting to 56000000 17:15:59
Count completed @ 17:16:01
Counting to 57000000 17:16:01
Count completed @ 17:16:02
Counting to 58000000 17:16:02
Count completed @ 17:16:04
Counting to 59000000 17:16:04
Count completed @ 17:16:06
Counting to 60000000 17:16:06
Count completed @ 17:16:08
Counting to 61000000 17:16:08
Count completed @ 17:16:10
Counting to 62000000 17:16:10
Count completed @ 17:16:12
Counting to 63000000 17:16:12
Count completed @ 17:16:14
Counting to 64000000 17:16:14
Count completed @ 17:16:16
Counting to 65000000 17:16:16
Count completed @ 17:16:18
Counting to 66000000 17:16:18
Count completed @ 17:16:20
Counting to 67000000 17:16:20
Count completed @ 17:16:22
Counting to 68000000 17:16:22
Count completed @ 17:16:24
Counting to 69000000 17:16:24
Count completed @ 17:16:26



FlameDuck(Posted 2005) [#4]
With program below and I know its not exact
but I figure even my poor old 1GHz AMD Athlon is
getting ~ 30 million integer operations a second.
Unfortunately it's not a very accurate test since the time used to execute the element you're trying to test for is dwarfed by the time it takes to execute the loop.


Emmett(Posted 2005) [#5]
I tried your code and got...

"Alert":
/Users/marksibly/blitzmax/src/compiler/output.cpp
30: failed assertion `0'


reverendhoover(Posted 2005) [#6]
Which is strange because I got that too!

I'm running Mac OS 10.3.8 ima g4 800mhz iBook :-o


rod54(Posted 2005) [#7]
PowerPC603 -- I know this is not a very accurate test
but looking at the time your sytem completed counting to 1 million and the time it completed counting to 66 million
took ~60 seconds which only averages a count of 1 million a second -- this doesn't seem right if you say you have a 2.4Ghz pentium 4 when all I am is running ia a 1 Ghz AMD Athlon and getting a count of ~ 30 million a second

not sure what gives there


rod54(Posted 2005) [#8]
PC603

ooops disregard my last post I forgot I reset count to 0 after each loop completed so it does look like you are
easily getting 35million + a second.