# Benchmark your Mac



## knighthawk (Aug 14, 2001)

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


----------



## knighthawk (Aug 14, 2001)

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.


----------



## rharder (Aug 15, 2001)

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


----------



## knighthawk (Aug 15, 2001)

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?


----------



## .dev.lqd (Aug 15, 2001)

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...


----------



## knighthawk (Aug 15, 2001)

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"?


----------



## jdog (Aug 15, 2001)

> _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?    

Sorry, that was lame.

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

-jdog


----------



## rharder (Aug 15, 2001)

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


----------



## .dev.lqd (Aug 15, 2001)

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.


----------



## rharder (Aug 16, 2001)

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


----------



## knighthawk (Aug 16, 2001)

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.


----------



## Pardus (Aug 17, 2001)

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.


----------



## FrgMstr (Aug 17, 2001)

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


----------



## sandsl (Aug 17, 2001)

Spec:
iMac 400mhz G3 (10.04) /192mb

Result:
2.666666746139526


----------



## knighthawk (Aug 17, 2001)

FrgMstr:

there is another thread called "Quick math benchmark for you to run" that has the original C source code.


----------



## ony_gosshamer (Aug 19, 2001)

For Lime DV iMac 400 mhz, 9.5 gig, 320 ram, 10.0.4

2.733333349227905


- eric


----------



## rharder (Aug 27, 2001)

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


----------



## Fahrvergnuugen (Aug 27, 2001)

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.


----------



## rharder (Aug 27, 2001)

You talking about this?

http://daugerresearch.com/fractaldemos/altivecfractalcarbon.html

I've never tried. I'll do that tonight (hopefully).

-Rob


----------



## Majik (Aug 27, 2001)

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


----------



## kbata (Aug 30, 2001)

CPU:450 G4
Model:8500
Ram:256
OSX 10.0.4
Time:1.8333


----------



## David Devore (Aug 31, 2001)

I just ran the Quickbench utility on a G3 (10.0.4) at the University of Texas and got a result of 2.566666603088379

The slowness problems i have experienced all seem related to things GUI..
doh.


----------



## knighthawk (Aug 31, 2001)

Just for fun, I ran the benchmark on the 733 Quicksilver (768mb RAM) with the following applications open:

Photoshop
Illustrator
Quark
Sherlock
OmniWeb
ATM Deluxe
Filemaker
iTunes

during the entire time, I was playing an MP3 with iTunes, and there was not a single pause or hiccup in the music.

Time: 1.9833

Now is that multi-tasking, or what!?!


----------



## mdnky (Sep 1, 2001)

Ran on a G3 300DT with 640mb ram, OSX 10.0.4, Terminal & IE5 opened.

3.082 sec.


----------



## mdnky (Sep 1, 2001)

Ran on a G3 300DT with 640mb ram, OSX 10.0.4, Terminal & IE5 opened.

3.082 sec.


----------



## Moulinsart (Sep 1, 2001)

2.017 minutes

on an iBook 466 Mhz, 192 Mo, MacOs X 10.0.4


----------



## marktorrance (Sep 2, 2001)

Results:

Dual 533/G4 AGP system with 384MB ram, running OS X 10.0.4, IE, Itunes: 1.53333

TiBook G4/500: 1.683333


----------



## dwaynepack (Sep 2, 2001)

CPU: 500mhz 
Model: pismo powerbook
RAM: 768MB 
OSX Build: 10.0.4 
Time: 1.950 minutes

nothing open


----------



## avg joe (Sep 5, 2001)

I'm running an iMac DV 400 G3 with a 60GB hard drive and 640 megs ram
test came back at 2.599999.


----------



## Captain Code (Sep 5, 2001)

> _Originally posted by rharder _
> *
> 
> Wish someone had a 1.3/1.4 Ghz Athlon to try out.
> ...


----------



## Captain Code (Sep 6, 2001)

I've searched the forums for the C source code to try and compile it for win32 but i couldn't find it.  Can someone post a link to the code or post the code itself please?


----------



## ulrik (Sep 6, 2001)

My Cube (see specs): 1,67777777 secs
My Quicksilver (see specs): 1,17233333 secs


----------



## macintroll (Sep 6, 2001)

well i've just test your soft on my 
*dual G4 450 Mhz  768 Mo 20 G running osX 5G40.* 

first  : i test with all my currents apps opens :
IE - Terminal - iTune playing - CPU monitor - "classic" - photoshop
my result was : 1,75   secs 

( only on one processor i think  

2° : 
 I close every things and relaunch the app :
time result : 1,64999999976158142  secs

quite the same no ? real multitask !!! yeah !
Well   if it could have done on the two pross i should have found the result cut by 2 ?????

great !!!!


----------



## kidemet (Sep 6, 2001)

Powerbook G4 Titanium on 500 MHz, 256 MB RAM

1.9500000 min


----------



## knighthawk (Sep 8, 2001)

> first : i test with all my currents apps opens :
> IE - Terminal - iTune playing - CPU monitor - "classic" - photoshop
> my result was : 1,75 secs
> 
> ( only on one processor i think 



The benchmark application only uses one processor, but OSX using both.  This means that while one processor was doing the benchmark, the other was playing an iTunes song.  One good way to see what your processor is doing is to open up the CPU monitor utility.  This just shows total CPU usage.  The Process Viewer utility shows in more detail what the processor is being used for.  If you change the sampling rate from the default 20 secs to 5, you can get a better idea of what is going on.  Run the benchmark while you are watching the Process Viewer, and you will see that every once in a while, the Login process appears.  Also you see that at certain times, the Window Manager (Aqua?) jumps up to about 10-15% and then back down to normal 2-3%.  I think both of these will be changed in the new version 10.1, and we will be able to see a slight increase in the times for this benchmark.


----------



## omegaroot (Sep 9, 2001)

In case anyone is interested I ran a few benchmarks on my not so new dual 533 ( digital audio, no fancy codenames for me =( )running OS X 10.0.4, 256 Megs. of RAM, 7200(?) RPM stock 20 gig. ATA, Adaptec Ultra160 controller attached to a 10k RPM Quantum 9 gig. and a nVidia GeForce2 MX.
ok, here goes...

Quickbench Time: 1.38333332 (min.)
 - i beleive it uses both CPUs indirectly cause i had other programs open at the time but none using the CPU, and while it was running CPU monitor showed both CPUs jumping up and down.

Altivec Fractal: 3351.4 MegaFLOPs (4.0 sec)

On the lighter side everyone seems to complain about OS X being slow. In X my DP is only a little bit slower, but greatly makes up for it with the multithreaded system. Ill be happy to take the speed hit considering it all even out when you add all the hangs you can run into in 9 while awaiting something to render/get connection/etc....

just my 2 cents though....


----------



## tbartus (Sep 10, 2001)

I took 2.76 when I had Netscape, StuffIt, Mail, Internet Connect open and 2.23 when I closed them all.

System>

iMac DV 400 Mhz
640 MB RAM
10 GB Hard Drive


----------



## phammybly (Jan 15, 2009)

i got 0.483333318762 minutes


----------



## Doctor X (Jan 15, 2009)

7 and a half years . . . that has to be a record for:





*T3h D34dly Thr34d N3cr0m4ncy!!11!!*






*_Downloads Application to Check_*

--J.D.


----------



## Doctor X (Jan 15, 2009)

0.5166666507720947 minutes.

Tried it again: 0.449999988079071 minutes!

Do I win?

--J.D.


----------



## szfretter (Jan 17, 2009)

.4166666567325592
macbook 2.4ghz intel core 2 duo, 2gb ram
i think i win..


----------



## Doctor X (Jan 17, 2009)

. . . of course, I did not shut down all of my other applications when I ran mine . . . 







--J.D.


----------



## lbrandt (Jan 21, 2009)

.776... on 12" PowerBook G4 with 1.5 GHz CPU and 1.25 GB memory


----------



## Ferdinand (Jan 21, 2009)

.85 on a MacBook, 2 GHz Intel Core Duo, 1.25 GB memory

Why is my MacBook slower than that PowerBook G4?


----------

