Unexpected threading performance result
tijl at ulyssis.org
Sun Oct 7 09:38:13 PDT 2007
On Sunday 07 October 2007 16:52:03 Ivan Voras wrote:
> For an unrelated purpose, I'm benchmarking performance of tree
> algorithms in SMP environments and my preliminary run has an unexpected
> result. Here's the typical output from the (small) benchmark program,
> run on a dual-core Athlon64 (i386 mode):
> Running benchmarks on small_nonuniform, 1000000 samples
> Step 1: Running 100 loops
> ** Step 1 benchmark completed 100 loops in 84.44 seconds.
> Step 2: Running 2 threads with 100 loops each
> ** Step 2 benchmark completed 100 loops in 2 threads in 167.46 seconds.
My guess is, that in the beginning of step1() and step2() you have to
add a line "time_start = gettime();".
More information about the freebsd-threads