Preliminary testing results:
Test:
Software: I ran some of my tumor growth simulation research. This is a very CPU-intensive, single-threaded app. I ran it at a high spatial resolution, which means that a single complete time step takes on the order of 10-20 minutes at this resolution. Code is C++ compiled with a host of optimizations with GCC.
Running on WinXP SP1a.
I'm going to call 1 unit of work (w) a single time step of the program.
Test 1: Two simultaneous threads, each with (virtual) CPU affinity set to CPU0 and CPU1, respectively for the two threads.
thread1 affinity CPU0
5:53:05 to 6:06:40 = 13 minutes, 35 seconds = 815 seconds
thread2 affinity CPU1
5:53:05 to 6:06:40 = 13 minutes, 35 seconds = 815 seconds
time / work = 815s / 2w = 407.5 s/w
Test 2: One thread with (virtual) CPU affinity set to CPU0.
thread1 affinity CPU0
6:08:00 to 6:18:30 = 10 minutes, 30 seconds = 630 seconds
time / work = 630 s/w
relative difference: (407.5-630)/630 = .35
Preliminary conclusion: I got 35% more computational work done by running two instances in 2 threads than just one thread. Interestingly, on the hyperthreading with each thread given a virtual CPU affinity (so they wouldn't hop from CPU to CPU), each thread completed the unit of work in equal time. That means that each thread gets equal CPU resources internally in the hardware.
I'll recompute these results without the CPU affinity to see if that makes any difference.
I wish I had a non-HT winXP installation to compare with.
This should have interesting consequences for the folding team.
-- Paul