Boost logo

Boost :

From: Rainer Deyke (rdeyke_at_[hidden])
Date: 2022-07-30 04:59:55


On 30.07.22 06:38, Jooseong Lee via Boost wrote:
> Dear Rainer,
>
> Compared with boost::unordered_map and boost::container::flat_set,
> I repeated inserting/retrieving/erasing 1,000,000 random std::int64_t in
> random order,
> and see the following results in my machine: (gcc 11.2 -O3)
> (repeated 200 times for each target for B-Tree and unordered_set, repeated
> 10 times for flat_set)
>
> My B-Tree: insert 196.22 ms, lookup 205.64 ms, erase 233.24 ms
> boost::container::flat_set : insert 58402.9 ms, lookup 217.73 ms, erase
> 59075.2 ms
> boost::unordered_set : insert 189.45 ms, lookup 232.19 ms, erase 268.01 ms

OK, I'm convinced. Your container seems to have competitive lookup
times, slightly better even, without the drawbacks of flat_set and
unordered_set (i.e. pathological insert/erase times for flat_set,
undefined iteration order and the need to provide a hash function for
unordered_set).

-- 
Rainer Deyke (rainerd_at_[hidden])

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk