Benchmark your Mac

knighthawk

Registered
This is a little CPU benchmark utility that was written by rharder. This benchmark calculates 10 million very complicated high precision random numbers and records the time that it took to complete the task.

This is not a multi-threaded application, so only one processor will be used. I don't know how to multi-thread it, and don't have a DP machine to test it anyway.

The file downloads as "attachment.php" which you can drag and drop onto Stuffit (it will not open it by itself).

Changes since the previous version:
1. Progress Bar Indicator now works so you can see the program chugging away.
2. Added a quick little icon
3. Added more description in the application.

If you download this and test your system, please post your results here.

CPU: 400mhz G4
Model: G4 Desktop AGP
RAM: 256MB
OSX Build: 10.0.4
Time: 2.183 minutes
 

Attachments

  • quickbench.zip
    50.8 KB · Views: 260
here is a little more info about the Quickbench.app

rharder has been working on a random number generator benchmark (dubbed quickbench) and has posted his code in the thread "Quick math benchmark for you to run". To be perfectly honest, I am just learning how to program in C and Objective-C, and I have absolutely no idea how to compile his code on the command line like he was requesting for everyone to do.

So I played around with the code and put an Objective-C wrapper on it. The first version had a non-functioning progressbar on it that I have fixed in this version. Getting the progessbar to work decreased performance a little, but I felt it was needed so everyone can see that the program is actually working.
 
LOL.

Thanks, knighthawk.

To give credit where credit is due, the random number generator was discovered by Pierre L'Ecuyer, Richard Simard, E. Jack Chen, and W. David Kelton.

Knighthawk, check out the ThreadWorker class at http://iharder.net/macosx/threadworker . If you launch two threads, each to run the math operations, each processor on a DP system should be set to work, and since it's not very RAM intensive, you should see near 100% utilization of both processors.

BTW, do you only update the progress bar every 100,000 iterations or so?

-Rob
 
I laid in bed the other night (not able to sleep) trying to figure out why the code I wrote for the progess bar wasn't working the way I expected it to. That night I came up with this solution instead...

<pre>
[ProgessBar setDoubleValue:0.0];
[ProgessBar displayIfNeeded];

for( p = 0; p < 40; p++)
{
for( i = 0; i < ( iters / 40 ); i++)
{
MatTwoPowModM (A1p0, B1, m1, 1);
MatTwoPowModM (A2p0, B2, m2, 1);
}

[ProgessBar incrementBy:2.5];
[ProgessBar displayIfNeeded];

} // end for: each iteration
</pre>

It the progress bar increments every 250,000 calculations now. The nice thing is that if the "iters" number changes, the progress bar and the loop all work proportionally together. Even though it is only incremented 40 times, without the "displayIfNeeded" the progress bar will not show up. I kinda wish there was a way to turn off the animation for this type of progress bar, but the method for animation only seems to apply to the indeterminate progress bar.

I will look into the multi-threading part. I don't know if I will understand it though, only been programming in C for two months. And only been programming at all (REALbasic) for four months. (I switched to C from REALbasic because the programs I wanted to write we more complicated and required faster processing than REALbasic could handle). I don't understand the math of the code that you wrote. I don't understand structures at all. I am still terrible with strings! My first programming class (C/C++) starts tonight at the local JC.

One more question: what exactly is a gigaflop and does that relate to the math in this calculation?
 
From what I know, *flops is a measure of FLoating point OPerations per second. A Gigaflop is one-billion float poating operations. Hehe... I'm not sure how it relates to this though :) Gigaflops has always seemed like a hefty number to be throwing around...
 
I suppose that gigaflops only counts "floats" and not "doubles"... so this benchmark wouldn't really apply.

I was wondering about this because it seems as if the Pentium and AMD processors were finishing (per clock) about 50% slower than the G4 (400mhz G4 ?= 600mhz P3). If this were true, wouldn't the Pentium have been the first "desktop supercomputer"?
 
Originally posted by rharder
LOL.
To give credit where credit is due, the random number generator was discovered by Pierre L'Ecuyer, Richard Simard, E. Jack Chen, and W. David Kelton.

-Rob

Is that E. Jack Chen or Jack E. Chen the great actor? :D :D

Sorry, that was lame.

Is there a way to use the Altivec stuff to speed this up?

-jdog
 
My limited testing has suggested that the x86 architectures FLOPS closely mirrors MHz. For instance, my 1.0Ghz Athlon just barely hits 1GigaFlop using some real benchmarking tools.

As for this little math code, it could hardly be called a serious benchmark, but it is a piece of "real world" code, and some chips' performances running it is interesting to compare.

From the other thread, I seem to recall that the fastest anyone was able to run it was about 1 1/2 minutes. That happened on a 450 or 500Mhz G4 and a 733Mhz Pentium III.

Wish someone had a 1.3/1.4 Ghz Athlon to try out.

Good luck, knighthawk, with the programming fun. Don't worry about the structures in the benchmark code. That's weird.

The ThreadWorker class is much nicer Objective-C code.

-Rob
 
If you want to be technical about it- I ran the benchmark twice in 1.6 minutes on my dual 500 system :)

That should count as about 40 seconds :) hehe.
 
AltiVec wouldn't help with this particular code. It uses doubles because it needs a guaranteed 53bits of accuracy in the mantissa. Floats are not accurate enough, and that's the biggest thing AltiVec handles. It's unfortunate, but it's just not what AltiVec was made for.

-Rob
 
I just benchmarked the macs at work with the GUI version.

Both running 10.0.4
G3 iMac 233 = 4.056667
G4 Quicksilver 733 = 1.486667

I was expecting the 733 to be closer to 1.2 or even 1.1 which would be nearly 2x faster than my 400 G4 at home.

The math works out to be what I would expect a 550mhz G4 to handle the calculations. I did notice that the Window Manager and other processes required just as much CPU power as on my G4 400. Maybe when 10.1 comes out (window manager is suppose to be a lot faster) the results will be different.

I have a friend that has a 667 G4, and he said he would try it out. He needs to repartition his drive to install X, so it will be a few days.
 
Who says money can't buy happiness, I just checked out the benchmark on my fresh 867 G4[640ram, build10.0.4, dual 19" mon.]

When I left open stuffit and explorer my time was 1.2000000047683716 and then I quit extra stuff and improved my time to 1.183333277702332

Are there some other test apps out there? I would be interested in checking things out. As always, you may as well enjoy being fast until apple releases something next gen.
 
hi all, ive got an athlon @1.466Ghz
in an earlier reply someone asked if an athlon could test it, i cant unzip the program supplied, is it OSX only or what do i have to do to use it.

If someone could post up instructions on how to do it, i would run it on my machine, i have MS visual studio, and a few other C and C++ compilers at hand just need complete instructions.

cheers
 
FrgMstr:

there is another thread called "Quick math benchmark for you to run" that has the original C source code.
 
I think the guy with the 1.4 or 1.8Ghz Athlon said he ran it in 30 secs or so.

I can see where the AltiVec and data pre-fetching streams are the real number crunching strength of the modern PowerPC (not used in this code).

So as I always say: there's no one OS - or platform - that's the best for all jobs.

-Rob
 
Someone asked about other benchmark utilities. The coolest one I've seen is altivec fractal carbon. This program will test your machine to see how fast it can render a fractal. It displays the peak / avg gigaflops that your machine achieved and even allows you to disable altivec & dual processors.

With this benchmark, Atlivec helps A TON. When I shut off dual processors and altivec, my G4 hit nearly [slightly faster] the same gflop rating as my 400MHz powerbook. Which is exactly what I expected to happen.
 
QuickSilver 867 MHz OS X 10.0.4 (4R14) 1.29999 minutes
Titanium PowerBook G4 500MHz OS X (almost)10.1 (5G24) 1.716666 minutes
 
Back
Top