Subject: Re: [boost] [review] The review of Boost.DoubleEnded starts today: September 21 - September 30
From: degski (degski_at_[hidden])
Date: 2017-09-26 06:33:45
Playing around with devector, I find the default growth strategy (x4)
rather (too) agressive. It also has some in my view un-intended effects.
Starting from let's say initial front and back capacities of each 4, now
adding 5 elements in front and 5 elements in the back (so 10), now gives me
a devector with capacity 128 (wow, why bothr with SBO at all).
Then looking how the free_capacity is split between front and back we get
95 and 23 (or the other way around, depending on whether we first push_back
or first push_front, even when front- and back-pushes are interleaved). As
we are multiplying by 4, this will become more and more skewed.
I think capacity() should go, and replaced by (next to the free versions)
front_capacity() and back_capacity().
I think the template allocator parameter should be second, not last.
Some bikeshedding (tm). I don't like any of the names much. The batch_deque
*is* a deque, it should be called that way. devector is a hybrid
vector/deque, I think veque would capture that. Then as to double_ended, I
think it's too long and describes badly what we are talking about. I
haven't got any (much) better proposal, but was thinking of Boost.Que, nice
i.e. boost::que::veque and boost::que::deque.