
27 May
2011
27 May
'11
12:22 a.m.
On 5/26/2011 4:44 PM, Frank Mori Hess wrote:
Note, I moved the declaration of the shared_ptrs inside the loops. Also, your benchmark on my machine shows a strong dependence on the order the tests are run. The first run is slower, which is why the "new" result is before the "make" result above, to demonstrate the effect.
You're right but make remains the same: 1) new: shared_ptr: 21234066 ns make: shared_ptr: 18122766 ns 2) make: shared_ptr: 18271141 ns new: shared_ptr: 13395539 ns But after analyzing the assembler dump of worker_make with block_ptr it's obvious RVO is a lie. -Phil