On March 12, 2016 1:25:03 PM EST, Phil Bouchard
On 03/12/2016 05:18 AM, Rob Stewart wrote:
On March 11, 2016 9:38:46 PM EST, Phil Bouchard
wrote:
block_proxy x; block_ptr<int> v(x, new block<int>(11)); proxy_ptr
u(new block ()); struct list : block_proxy { public: list() : root(*this) {} [...] private: block_ptr<node> root; };
I simplified the syntax of the first two examples, but this still seems complicated given the various components and ways to combine and use them.
[snip]
- If we use fastblock<>() then the speedup can go up to 600% compared to shared_ptr<>:
That's yet another piece to the complexity equation.
If people write game engines then I think they will understand this part easily ;)
My point is that there are many components and techniques needed to use your library, which makes it complex and, I imagine, will lead to confusion.
benchmark.cpp seems flawed for numerous reasons. You measure usage of the make function through a function pointer. You don't eliminate cold cache effects on timing each variation. You are timing free store allocations and deallocations, which can have unknown side effects. You aren't accounting for code elision by the optimizer.
I am not accounting for any optimization, specially for block_ptr<> because I don't even use move semantics yet, etc.
If that's the case, don't bother reporting comparisons between the different components and approaches. Unless you're measuring the right things correctly, the measurements are mostly useless. ___ Rob (Sent from my portable computation engine)