|
#1
| ||||
| ||||
|
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 |
|
#2
| ||||
| ||||
|
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. |
|
#3
| ||||
| ||||
|
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
__________________ There are only 10 kinds of people in the world: Those who understand binary, and those who don't. |
|
#4
| ||||
| ||||
|
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? |
|
#5
| ||||
| ||||
|
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...
|
|
#6
| ||||
| ||||
|
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"? |
|
#7
| ||||
| ||||
| Quote:
Sorry, that was lame. Is there a way to use the Altivec stuff to speed this up? -jdog |
|
#8
| ||||
| ||||
|
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
__________________ There are only 10 kinds of people in the world: Those who understand binary, and those who don't. |
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| A bit of nostalgia: A Salute to Mac OS X | simX | Apple News, Rumors & Discussion | 31 | March 24th, 2005 07:45 AM |
| HP Photosmart 1315 and USB Print Sharing | zwheeloc | Mac Classic System & Software | 12 | February 6th, 2003 09:20 PM |
| apps list | Mac Osxtopus | Mac OS X System & Mac Software | 7 | May 29th, 2002 12:31 PM |
| Apple: Forget XP, try the Mac | tagliatelle | Bob's Place | 1 | November 25th, 2001 07:12 AM |
| Netscape 6.1 Profile Transfer from Mac OS 9.2.1 to Mac OS X | chemistry_geek | Apple News, Rumors & Discussion | 0 | October 12th, 2001 06:42 PM |