TestCPUmath: First Code for MOS from Turkey
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Spidey
    Posts: 568 from 2003/2/24
    From: Netherlands
    Hello yyoru,


    I've got a PegII, 512MB, 80Gb (8MB cache) HD and Radeon9000Pro 64MB GFX.

    Just tried your code.
    Meanwhile I was still browsing, so I don't know if that affects your measurements. I got an error-message at the end.
    The results from Holland :-)


    Timetest CPU Test Program 0.1 by YILMAZ YORU
    SCALE (Number of MOPS, Default=1000) :
    1000

    Wait please ...
    Test-1:Long Int Add ... 14.280 sec. 70.028 MOPS
    Test-2:Long Int Sub ... 14.260 sec. 70.126 MOPS
    Test-3:Long Int Mul ... 14.060 sec. 71.124 MOPS
    Test-4:Long Int Div ... 35.340 sec. 28.297 MOPS

    Test-5:Double Float Add ... 24.880 sec. 40.193 MOPS
    Test-6:Double Float Sub ... 24.740 sec. 40.420 MOPS
    Test-7:Double Float Mul ... 24.760 sec. 40.388 MOPS
    Test-8:Double Float Div ... 52.680 sec. 18.983 MOPS
    Ram Disk:timetest.elf failed returncode 30


    Did that test again, this time not touching anything:

    Timetest CPU Test Program 0.1 by YILMAZ YORU
    SCALE (Number of MOPS, Default=1000) :1000

    Wait please ...
    Test-1:Long Int Add ... 14.060 sec. 71.124 MOPS
    Test-2:Long Int Sub ... 14.080 sec. 71.023 MOPS
    Test-3:Long Int Mul ... 14.060 sec. 71.124 MOPS
    Test-4:Long Int Div ... 34.180 sec. 29.257 MOPS

    Test-5:Double Float Add ... 25.080 sec. 39.872 MOPS
    Test-6:Double Float Sub ... 25.100 sec. 39.841 MOPS
    Test-7:Double Float Mul ... 25.100 sec. 39.841 MOPS
    Test-8:Double Float Div ... 52.240 sec. 19.142 MOPS
    Ram Disk:timetest.elf failed returncode 30


    Still the error.

    Bye,

    Spidey
  • »11.02.04 - 21:01
    Profile Visit Website
  • Cocoon
    Cocoon
    porneL
    Posts: 49 from 2003/7/16
    the "error" is because main() doesn't return any value.
  • »11.02.04 - 22:24
    Profile
  • Just looking around
    yyoru
    Posts: 13 from 2004/1/19
    From: Turkey
    yes, u are right, but i dont want to change code, cuz this one is the most friendly one.
  • »11.02.04 - 22:37
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 278 from 2003/3/4
    Test done on a 2.4 Ghz P4.
    It is amazing to see how faster the Cygwin version is for the 2 first integer tests :-o

    D:\temp>testcpumath
    TestCPUmath CPU Test Program 0.2 by YILMAZ YORU
    SCALE (Number of MOPS, Default=1000) :1000

    Wait please ...
    Test-1:Long Int Add ... 3.797 sec. 263.366 MOPS
    Test-2:Long Int Sub ... 3.781 sec. 264.480 MOPS
    Test-3:Long Int Mul ... 2.625 sec. 380.952 MOPS
    Test-4:Long Int Div ... 25.469 sec. 39.263 MOPS

    Test-5:Double Float Add ... 10.078 sec. 99.226 MOPS
    Test-6:Double Float Sub ... 10.047 sec. 99.532 MOPS
    Test-7:Double Float Mul ... 10.484 sec. 95.383 MOPS
    Test-8:Double Float Div ... 18.594 sec. 53.781 MOPS

    D:\temp>TestCPUmathCYG.exe
    TestCPUmath CPU Test Program 0.1 by YILMAZ YORU
    SCALE (Number of MOPS, Default=1000) :1000

    Wait please ...
    Test-1:Long Int Add ... 2.594 sec. 385.505 MOPS
    Test-2:Long Int Sub ... 2.578 sec. 387.898 MOPS
    Test-3:Long Int Mul ... 3.453 sec. 289.603 MOPS
    Test-4:Long Int Div ... 24.938 sec. 40.099 MOPS

    Test-5:Double Float Add ... 10.453 sec. 95.666 MOPS
    Test-6:Double Float Sub ... 10.453 sec. 95.666 MOPS
    Test-7:Double Float Mul ... 10.407 sec. 96.089 MOPS
    Test-8:Double Float Div ... 18.531 sec. 53.964 MOPS
    Test Done!
  • »12.02.04 - 15:42
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 278 from 2003/3/4
    I tried it on a P3 500 and the integer results were still faster than the G4 1000 :-?

    What compiler did you use ? did you enable optimization ?
  • »13.02.04 - 18:09
    Profile
  • Butterfly
    Butterfly
    Black_Eagle
    Posts: 70 from 2003/6/5
    From: Karlstad, Sweden
    Hi, tested it on my Pegasos II G4 1GHz here:

    Eagle:Download> TestCPUmathPPC
    TestCPUmath CPU Test Program 0.2 by YILMAZ YORU
    SCALE (Number of MOPS, Default=1000) :1000

    Wait please ...
    Test-1:Long Int Add ... 14.320 sec. 69.832 MOPS
    Test-2:Long Int Sub ... 14.440 sec. 69.252 MOPS
    Test-3:Long Int Mul ... 14.220 sec. 70.323 MOPS
    Test-4:Long Int Div ... 35.960 sec. 27.809 MOPS

    Test-5:Double Float Add ... 24.500 sec. 40.816 MOPS
    Test-6:Double Float Sub ... 24.780 sec. 40.355 MOPS
    Test-7:Double Float Mul ... 24.320 sec. 41.118 MOPS
    Test-8:Double Float Div ... 52.500 sec. 19.048 MOPS
    Test Done!

    ---

    Then I compiled it myself...

    Eagle:Download> gcc TestCPUmath.c -o ram:Test
    TestCPUmath.c: In function `main':
    TestCPUmath.c:35: warning: return type of `main' is not `int'

    And tried it again... seems it's the same numbers but 10 times faster so I guess there is some error with one decimal or extra zero in the compiled version on the page? Obviously a G4 at 1GHz has more computing power than a Athlon at 1,466GHz!

    So here are the new tests:

    RamDisk:> Test
    TestCPUmath CPU Test Program 0.2 by YILMAZ YORU
    SCALE (Number of MOPS, Default=1000) :1000

    Wait please ...
    Test-1:Long Int Add ... 1.408 sec. 710.227 MOPS
    Test-2:Long Int Sub ... 1.418 sec. 705.219 MOPS
    Test-3:Long Int Mul ... 1.410 sec. 709.220 MOPS
    Test-4:Long Int Div ... 3.498 sec. 285.878 MOPS

    Test-5:Double Float Add ... 2.480 sec. 403.226 MOPS
    Test-6:Double Float Sub ... 2.472 sec. 404.531 MOPS
    Test-7:Double Float Mul ... 2.500 sec. 400.000 MOPS
    Test-8:Double Float Div ... 5.236 sec. 190.985 MOPS
    Test Done!

    ---

    And on my PC, a 1.466GHz Athlon (XP1700+) and the DOS version I got:

    Wait please ...
    Test-1:Long Int Add ... 3.922 sec. 254.972 MOPS
    Test-2:Long Int Sub ... 2.813 sec. 355.492 MOPS
    Test-3:Long Int Mul ... 3.547 sec. 281.928 MOPS
    Test-4:Long Int Div ... 34.906 sec. 28.648 MOPS

    Test-5:Double Float Add ... 22.969 sec. 43.537 MOPS
    Test-6:Double Float Sub ... 24.812 sec. 40.303 MOPS
    Test-7:Double Float Mul ... 22.375 sec. 44.693 MOPS
    Test-8:Double Float Div ... 31.391 sec. 31.856 MOPS
    Test Done!
  • »14.02.04 - 11:08
    Profile Visit Website
  • Just looking around
    yyoru
    Posts: 13 from 2004/1/19
    From: Turkey
    I think you made a mistake while compiling. timer_interval should be
    100 for AmigaOS, 1000 for WIN/DOS and 100000 for linux.

    Black Eagle Do you put 100 for the timer_interval?
    G4 still slow. If you dont belive what is interval then take a
    stopwatch and measure what any step takes time.
    The first parameter (seconds) should be aproximately same as your
    stopwatch.

    Unfortunately we specially I have a trouble, i know it
    should be faster. But what should I have to do. Specially what kinda
    of options should I set ?

    Would someone able to explain what is wrong, or what kinda code should
    I wrote for G4 for the fastest calculation?

    Currently still I have 70 MOPS about and 40 MOPS about for the
    floating operations with my PegII/G4 1ghz. :(

    Thanx.
  • »16.02.04 - 11:31
    Profile Visit Website