Test your CPU processing power

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

dug777

Lifer
Oct 13, 2004
24,778
4
0
hmmm dug777 says he likes this idea, but his computer crashes without the OP's help :p
 

glugglug

Diamond Member
Jun 9, 2002
5,340
1
81
Glugglug thinks sorting is pretty much memory bandwidth limited, except maybe the heap sort, Especially insertion sort. Except that your data size is small enough to fit in cache on a decent CPU (your arrays are 400KB). 256K vs. 512KB cache will make all the difference.

Glugglug thinks mdchesne is crashing due to crappy CPU cache, or crappy RAM on a Celeron.
 

glugglug

Diamond Member
Jun 9, 2002
5,340
1
81
glugglug is disappointed that this application only uses 1 CPU core. He thinks it should be multithreaded. Glugglug's X2 only reached a temperature of 93F (34C) while running this program.

Quick Sort 8.3531 Heap Sort 35.3188 Merge Sort 1.8563 Insertion Sort: flashed off the screen too quick to read (console window closed with application), it was about as fast as the merge, which makes glugglug fairly certain it is NOT doing an insertion sort. In fact, he thinks if you fix it so it DOES do an insertion sort, than on low memory bandwidth machines it will take DAYS to run.

glugglug also thinks that you should change line 127 to have a < instead of a <= and maybe change lines 135-136 to have <= and instead of < and that is part of why the quicksort is so much slower than the merge sort (they should be about the same).

hmm, glugglug just tried this, it seems to slow it down a litttle, he doesn't know why.

glugglug guesses you are running on a P4 and seeing lower latency from inclusive & lower "way-ness" L2 on the heap sort? (which will backfire if you increase the data set size)

Interestingly enough, running 1 on each core makes each one FASTER, I am thinking cool n' quiet was making it run at a lower clock rate with only 1 thread.

Quicksort times running 2 simultaneously: 4.6187/4.6755
Heapsort times: 13.2359/13.2516
Merge sort: 1.3156/1.3375
Insertion Sort: 1.1265/1.1969. (This time I got the press any key to continue thing so I could read it)

All while typing in this browser.

Overlap in time for execution of the 2 threads is not 100% but close.
 

mdchesne

Banned
Feb 27, 2005
2,810
1
0
glugglug guesses you are running on a P4 and seeing lower latency from inclusive & lower "way-ness" L2 on the heap sort? (which will backfire if you increase the data set size)
mdchesne is running on an overclocked A64 3200+ @ 2.4ghz on stock cooling. he also realized why his system was dying every once in a while while constantly running larger array sizes...

dust. enemy of all. he cleaned out the filters on his PC-60 and blew out all the dust from the interior of his case and HSFs. CPU temps nice and low now :)
 

mdchesne

Banned
Feb 27, 2005
2,810
1
0
prof said that the Insertion Sort should cost more to run... but i have three people who made similar programs saying that's not true. anyone validate this for sure?
 

Steve

Lifer
May 2, 2004
15,945
11
81
sm8000 nearly forgot about this and appreciates the bump, as his Opterons are now up and running. He will try this at home tonight. He hopes this doesn't get them too hot, they idle at 52-54^C.
 

Steve

Lifer
May 2, 2004
15,945
11
81
I'm not too worried as long as they don't exceed AMD's recommended case temp. of 70^C, however I am making a note to try and find some 246HEs before I try this.
 

Steve

Lifer
May 2, 2004
15,945
11
81
Hey mdchesne, I wonder if there's a way to make this run on a PC's GPU(s). Reason being is I'm playing with this FireGL I acquired recently and I wonder how well it would do compared to others, especially those in SLI. I have a friend who did something like this once years ago, I'd have to dig it up if you want.
 

Steve

Lifer
May 2, 2004
15,945
11
81
Attack of the n00b here!

I d/l'd and installed eclipse. Saved the first .java file, and in eclipse did a File->Open on it.

Now what?