On 10 May 2016 at 02:01, Soul Studios
Actually tbb concurrent_vector doesn't allow erasures other than clear(), so it wouldn't be suitable for comparisons in the situations where you'd use a colony. Interesting structure though.
You're obviously right.
...you can have mutexes on individual blocks rather than the whole thing. Also some reads and writes can occur at the same time.
Is there currently in your implementation a way to know to which block an item belongs to (or to get the size of its block, which I guess comes down to the same), i.e. to know which mutex should be considered. If not, could that be a future feature?
Yes, I noticed the MSVC deque performance results were weak, that's a pretty extraordinarily bad implementation! Wow.
I would think it's historical and hasn't been changed since the beginning of M$-time to preserve binary-backward-compatibility (which from what I was made to understand a change of chunk-size entails). It's a shame actually that the chunk-size is not user-settable (as per the standard from what I understand) for a std::deque or boost::deque, the latter with a chunk size of 512b last time I looked. I always use the boost one... maybe on Windows (with VC) you should test against the boost::deque instead, in order to get some sensible data... I see your implementation gives control over the first block on construction (and the rest then follows the growth policy), NICE! I like it! degski -- (\___/) (+'.'+) (")_(") This is Bunny. Copy and paste Bunny into your signature to help him gain world domination!