Bench Your New Mac With Factorial Bench

Posted:
in Current Mac Hardware edited January 2014
This is the fully threaded CPU benchmark that I posted a while ago. I let Xcode optimize it this time and it includes the high-resolution timers, automatic CPU speed and bus detection, and an increase in loops to do 200 million factorials by default. It is a Universal Binary.



With the new iMacs out and the new MacBook Pros, it's time to see how they measure up. Also people with 3gHz Mac Pros can weigh in.



Download the folder, unzip it, and then double-click the "factorialBench" executable.



It will open Terminal and run.



By default, it will generate the number of threads that equals the number of cores in the machine on which it is running, and 200 million loops. To use different numbers, run it in Terminal by writing



./factorialBench c i



where c is the number of threads you want, and i is the number of iterations you want. For example to do 2 threads calculating 500 million loops, write



./factorialBench 2 500000000



Don't exceed 4 billion though. It's not 64-bit.

 

 
«134

Comments

  • Reply 1 of 78
    aplnubaplnub Posts: 2,605member
    I love it when you post these challenges.



    Tomorrow, I will clock my 2.8 GHz C2E 24" iMac for ya. It is currently doing an initial SuperDuper backup. While doing that it got 6.6 seconds @ 200,000,000!



    I will shutdown Security Spy and VMWare Fusion with Windows running in the background as well, and I know that will help a bunch. This thing is a screamer.



    (null) ("iMac7,1") with 2 cores, running at 2.80 gHz.

    Frontside bus: 800.00 mHz

    Installed memory: 4.00 GB



    200,000,000 factorials will be calculated by creating 2 threads.



    Thread # 1 created.

    Thread # 2 created.

    Waiting for threads to finish...

    Thread # 1: 100,000,000 factorials calculated in 6.222422 seconds at 16,070,912 factorials per second.

    Thread # 2: 100,000,000 factorials calculated in 6.271790 seconds at 15,944,411 factorials per second.
  • Reply 2 of 78
    lundylundy Posts: 4,466member
    I figured that 2.8 would be fast.
  • Reply 3 of 78
    r3dx0rr3dx0r Posts: 201member
    Mac Pro ("MacPro1,1") with 4 cores, running at 3.00 gHz.

    Frontside bus: 1.33 gHz

    Installed memory: 3.00 GB



    200,000,000 factorials will be calculated by creating 4 threads.



    Thread # 1 created.

    Thread # 2 created.

    Thread # 3 created.

    Thread # 4 created.

    Waiting for threads to finish...

    Thread # 4: 50,000,000 factorials calculated in 2.838536 seconds at 17,614,714 factorials per second.

    Thread # 3: 50,000,000 factorials calculated in 2.875286 seconds at 17,389,576 factorials per second.

    Thread # 1: 50,000,000 factorials calculated in 2.886274 seconds at 17,323,372 factorials per second.

    Thread # 2: 50,000,000 factorials calculated in 2.913413 seconds at 17,162,002 factorials per second.



  • Reply 4 of 78
    lundylundy Posts: 4,466member
    Here's my 2.66 quad





    Mac Pro ("MacPro1,1") with 4 cores, running at 2.66 gHz.

    Frontside bus: 1.33 gHz

    Installed memory: 3.00 GB



    200,000,000 factorials will be calculated by creating 4 threads.



    Thread # 1 created.

    Thread # 2 created.

    Thread # 3 created.

    Thread # 4 created.

    Waiting for threads to finish...

    Thread # 4: 50,000,000 factorials calculated in 3.311812 seconds at 15,097,476 factorials per second.

    Thread # 3: 50,000,000 factorials calculated in 3.312709 seconds at 15,093,388 factorials per second.

    Thread # 2: 50,000,000 factorials calculated in 3.318167 seconds at 15,068,561 factorials per second.

    Thread # 1: 50,000,000 factorials calculated in 3.354682 seconds at 14,904,543 factorials per second
  • Reply 5 of 78
    (null) ("MacBookPro3,1") with 2 cores, running at 2.20 gHz.

    Frontside bus: 800.00 mHz

    Installed memory: 2.00 GB



    200,000,000 factorials will be calculated by creating 2 threads.





    Thread # 1 created.

    Thread # 2 created.

    Waiting for threads to finish...

    Thread # 2: 100,000,000 factorials calculated in 8.052964 seconds at 12,417,788 factorials per second.

    Thread # 1: 100,000,000 factorials calculated in 8.070865 seconds at 12,390,246 factorials per second.



    IMO, not too bad when compared to those MPs
  • Reply 6 of 78
    Here's mine:



    Mac Pro ("MacPro1,1") with 4 cores, running at 2.66 gHz.

    Frontside bus: 1.33 gHz

    Installed memory: 5.00 GB



    200,000,000 factorials will be calculated by creating 4 threads.



    Thread # 1 created.

    Thread # 2 created.

    Thread # 3 created.

    Thread # 4 created.

    Waiting for threads to finish...

    Thread # 4: 50,000,000 factorials calculated in 3.293294 seconds at 15,182,368 factorials per second.

    Thread # 2: 50,000,000 factorials calculated in 3.294029 seconds at 15,178,980 factorials per second.

    Thread # 1: 50,000,000 factorials calculated in 3.312694 seconds at 15,093,456 factorials per second.

    Thread # 3: 50,000,000 factorials calculated in 3.321661 seconds at 15,052,710 factorials per second.
  • Reply 7 of 78
    gargar Posts: 1,201member
    Quote:

    ("MacBookPro2,2") with 2 cores, running at 2.33 gHz.

    Frontside bus: 664.00 mHz

    Installed memory: 2.00 GB



    200,000,000 factorials will be calculated by creating 2 threads.



    Thread # 1 created.

    Thread # 2 created.

    Waiting for threads to finish...

    Thread # 1: 100,000,000 factorials calculated in 7.542926 seconds at 13,257,455 factorials per second.

    Thread # 2: 100,000,000 factorials calculated in 7.559233 seconds at 13,228,855 factorials per second.



    My 24" iMac 2.8GHz will arrive on monday.

    I'm curious how much faster it will be.
  • Reply 8 of 78
    iposteriposter Posts: 1,560member
    Quote:

    2007-08-18 21:07:24.309 factorialBench[2023] *** +[NSString stringWithCString:encoding:]: selector not recognized

    2007-08-18 21:07:24.312 factorialBench[2023] *** Uncaught exception: <NSInvalidArgumentException> *** +[NSString stringWithCString:encoding:]: selector not recognized

    Trace/BPT trap

    logout



    Hmm, does it require 10.4? Or perhaps my G4 is too weak to run it?



    <-- Has weak UNIX-fu
  • Reply 9 of 78
    (null) ("iMac7,1") with 2 cores, running at 2.40 gHz.

    Frontside bus: 800.00 mHz

    Installed memory: 2.00 GB



    200,000,000 factorials will be calculated by creating 2 threads.



    Thread # 1 created.

    Thread # 2 created.

    Waiting for threads to finish...

    Thread # 2: 100,000,000 factorials calculated in 9.380967 seconds at 10,659,882 factorials per second.

    Thread # 1: 100,000,000 factorials calculated in 10.524780 seconds at 9,501,386 factorials per second.
  • Reply 10 of 78
    lundylundy Posts: 4,466member
    Tiger only. The method NSString stringWithCString:model encoding:1 is 10.4 or above only.
  • Reply 11 of 78
    nvidia2008nvidia2008 Posts: 9,262member
    (edit see proper benchmark below)
  • Reply 12 of 78
    nvidia2008nvidia2008 Posts: 9,262member
    Quote:
    Originally Posted by jonnyboy View Post


    (null) ("iMac7,1") with 2 cores, running at 2.40 gHz.

    Frontside bus: 800.00 mHz

    Installed memory: 2.00 GB



    200,000,000 factorials will be calculated by creating 2 threads.



    Thread # 1 created.

    Thread # 2 created.

    Waiting for threads to finish...

    Thread # 2: 100,000,000 factorials calculated in 9.380967 seconds at 10,659,882 factorials per second.

    Thread # 1: 100,000,000 factorials calculated in 10.524780 seconds at 9,501,386 factorials per second.



    You got OWNED buddy.



    (null) ("MacBook2,1") with 2 cores, running at 2.00 gHz.

    Frontside bus: 664.00 mHz

    Installed memory: 2.00 GB



    200,000,000 factorials will be calculated by creating 2 threads.



    Thread # 1 created.

    Thread # 2 created.

    Waiting for threads to finish...

    Thread # 2: 100,000,000 factorials calculated in 8.812650 seconds at 11,347,325 factorials per second.

    Thread # 1: 100,000,000 factorials calculated in 8.831569 seconds at 11,323,016 factorials per second.

    logout

    [Process completed]
  • Reply 13 of 78
    nvidia2008nvidia2008 Posts: 9,262member
    8.8 seconds w000t
  • Reply 14 of 78
    lundylundy Posts: 4,466member
    LOL. Hope he doesn't freak out... 2 gHz beats 2.4 gHz? He must have a virus oh nooooes... quick rush out and buy Norton
  • Reply 15 of 78
    buddhabuddha Posts: 386member
    (null) ("MacPro2,1") with 8 cores, running at 3.00 gHz.

    Frontside bus: 1.33 gHz

    Installed memory: 4.00 GB



    200,000,000 factorials will be calculated by creating 8 threads.



    Thread # 1 created.

    Thread # 2 created.

    Thread # 3 created.

    Thread # 4 created.

    Thread # 5 created.

    Thread # 6 created.

    Thread # 7 created.

    Thread # 8 created.

    Waiting for threads to finish...

    Thread # 8: 25,000,000 factorials calculated in 1.410813 seconds at 17,720,280 factorials per second.

    Thread # 5: 25,000,000 factorials calculated in 1.426592 seconds at 17,524,280 factorials per second.

    Thread # 1: 25,000,000 factorials calculated in 1.432179 seconds at 17,455,918 factorials per second.

    Thread # 6: 25,000,000 factorials calculated in 1.437599 seconds at 17,390,104 factorials per second.

    Thread # 3: 25,000,000 factorials calculated in 1.448619 seconds at 17,257,818 factorials per second.

    Thread # 7: 25,000,000 factorials calculated in 1.451227 seconds at 17,226,802 factorials per second.

    Thread # 2: 25,000,000 factorials calculated in 1.453726 seconds at 17,197,190 factorials per second.

    Thread # 4: 25,000,000 factorials calculated in 1.487536 seconds at 16,806,314 factorials per second.

    logout

    [Process completed]



    What do I win?
  • Reply 16 of 78
    msanttimsantti Posts: 1,377member
    Quote:
    Originally Posted by buddha View Post


    (null) ("MacPro2,1") with 8 cores, running at 3.00 gHz.

    Frontside bus: 1.33 gHz

    Installed memory: 4.00 GB



    200,000,000 factorials will be calculated by creating 8 threads.



    Thread # 1 created.

    Thread # 2 created.

    Thread # 3 created.

    Thread # 4 created.

    Thread # 5 created.

    Thread # 6 created.

    Thread # 7 created.

    Thread # 8 created.

    Waiting for threads to finish...

    Thread # 8: 25,000,000 factorials calculated in 1.410813 seconds at 17,720,280 factorials per second.

    Thread # 5: 25,000,000 factorials calculated in 1.426592 seconds at 17,524,280 factorials per second.

    Thread # 1: 25,000,000 factorials calculated in 1.432179 seconds at 17,455,918 factorials per second.

    Thread # 6: 25,000,000 factorials calculated in 1.437599 seconds at 17,390,104 factorials per second.

    Thread # 3: 25,000,000 factorials calculated in 1.448619 seconds at 17,257,818 factorials per second.

    Thread # 7: 25,000,000 factorials calculated in 1.451227 seconds at 17,226,802 factorials per second.

    Thread # 2: 25,000,000 factorials calculated in 1.453726 seconds at 17,197,190 factorials per second.

    Thread # 4: 25,000,000 factorials calculated in 1.487536 seconds at 16,806,314 factorials per second.

    logout

    [Process completed]



    What do I win?



    You win for having the most expensive system.
  • Reply 17 of 78
    iposteriposter Posts: 1,560member
    Quote:
    Originally Posted by lundy View Post


    Tiger only. The method NSString stringWithCString:model encoding:1 is 10.4 or above only.



    Ah, thanks. I've been debating wether to upgrade now, or wait for 10.5...
  • Reply 18 of 78
    lundylundy Posts: 4,466member
    Heh - that's the first time it's actually been tested on a genuine octo-Mac.
  • Reply 19 of 78
    jgbxjgbx Posts: 33member
    (null) ("MacBookPro3,1") with 2 cores, running at 2.20 gHz.

    Frontside bus: 800.00 mHz

    Installed memory: 2.00 GB




    200,000,000 factorials will be calculated by creating 2 threads.



    Thread # 1 created.

    Thread # 2 created.

    Waiting for threads to finish...

    Thread # 2: 100,000,000 factorials calculated in 8.114621 seconds at 12,323,434 factorials per second.

    Thread # 1: 100,000,000 factorials calculated in 8.141211 seconds at 12,283,185 factorials per second.

    logout

    [Process completed]





    Power Macintosh G5 ("PowerMac7,3") with 2 cores, running at 2.50 gHz.

    Frontside bus: 1.25 gHz

    Installed memory: 6.50 GB




    200,000,000 factorials will be calculated by creating 2 threads.



    Thread # 1 created.

    Thread # 2 created.

    Waiting for threads to finish...

    Thread # 1: 100,000,000 factorials calculated in 10.620112 seconds at 9,416,096 factorials per second.

    Thread # 2: 100,000,000 factorials calculated in 10.691020 seconds at 9,353,644 factorials per second.

    logout

    [Process completed]
  • Reply 20 of 78
    (null) ("MacBookPro2,1") with 2 cores, running at 2.33 gHz.

    Frontside bus: 664.00 mHz

    Installed memory: 3.00 GB



    200,000,000 factorials will be calculated by creating 2 threads.



    Thread # 1 created.

    Thread # 2 created.

    Waiting for threads to finish...

    Thread # 2: 100,000,000 factorials calculated in 7.577313 seconds at 13,197,290 factorials per second.

    Thread # 1: 100,000,000 factorials calculated in 7.669458 seconds at 13,038,731 factorials per second.
Sign In or Register to comment.