|
Boost : |
Subject: Re: [boost] [flat_map] Any interest in a flat_map variant that is much faster on insertion/erase at the price of a slower lookup?
From: Giacomo Drago (giacomo_at_[hidden])
Date: 2015-03-13 09:50:40
On 2015-03-13 13:37, Ion Gaztañaga wrote:
> El 13/03/2015 a las 10:11, Giacomo Drago escribió:
>> Insertions are one by one, and they are random with respect to the order
>> of the keys. Same applies for lookups and erasures. No cheating.
>
> I didn't want to suggest any cheating, just trying to understand the
> scenario. If insertions are by range, then flat_map can be optimized. If
> insertions are one by one, it's more difficult, unless there are two
> phases, first insertion (without lookups between insertions) and after
> that, only searches. That scenario could be also optimized.
They are one by one, and can interleave in any possible way without
affecting performance. I didn't imply you were suggesting any cheating,
but I know that benchmarks can be crafted to make things look better
than they are. And you can do this without even knowing.
Best
GIacomo
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk