Bench Your New Mac With Factorial Bench
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.
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.
Comments
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.
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.
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
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
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.
("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.
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
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.
(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]
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?
(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.
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...
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]
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.