Subject: Re: [boost] [pool2] Requests for comment
From: Klaim - Joël Lamotte (mjklaim_at_[hidden])
Date: 2012-10-16 10:01:57


On Tue, Oct 16, 2012 at 2:52 PM, Jeffrey Lee Hellrung, Jr. <
jeffrey.hellrung_at_[hidden]> wrote:

> Sounds basically equivalent to a std::vector<T*> or (better) std::vector<
> std::unique_ptr<T> >, no? I would expect these explicit pointer-based
> containers to have a marginally smaller memory footprint than
> stable_vector< optional<T> >.
>

Actually you gave me doubt, so I made sure I was comparing
std::vector<std::unique_ptr<T>> with the other variants in my tests.
Now apparently I get roughly the same numbers as as boost::stable_vector<
optional<T>> in performance measurements.
Which makes me think my tests might be incorrect. :)
I'll take a closer look soon. I'm surprised using new directly is as
efficient as resetting an optional value.

Joel Lamotte