
On 5/27/2011 6:25 AM, Frank Mori Hess wrote:
My cpu cores turn down their clock frequency when idle to save power, and I don't know how long it takes to switch speeds. Maybe the cpu clock speed is jumping from low to high speed while the benchmark is running.
I get different results after changing the priority: # nice --20 .../benchmark new: auto_ptr: 9602673 ns shared_ptr: 21695797 ns block_ptr: 136451426 ns make: auto_ptr: 10390549 ns shared_ptr: 21044471 ns block_ptr: 237520341 ns # nice -20 .../benchmark new: auto_ptr: 9317126 ns shared_ptr: 17450029 ns block_ptr: 69507905 ns make: auto_ptr: 5028312 ns shared_ptr: 10538796 ns block_ptr: 117030907 ns Although worker_make looks faster for auto_ptr & shared_ptr, it is slower for block_ptr. The assembly code is still much simpler for worker_new and it should be faster. -Phil