Re: inline vector container

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 3 Feb 2016, Allen Samuels wrote:
> One thing that the code base needs is a simple vector container that is
> optimized for a small number of elements, i.e., for small element counts we
> avoid the malloc/free overhead. But fully supports being resized into larger
> containers that are unbounded. Of course it will need to follow all of the
> proper object copy/move semantics so that things like unique_ptr, etc work
> correctly.
> 
> I heard rumors that there was one available in the boost world, but I can’t
> seem to find it. Do you know about one being available?

http://www.boost.org/doc/libs/1_60_0/doc/html/boost/container/small_vector.html

> I’ve been prototyping one myself, just to get re-familiar with all of the
> C++11 move sementics, and trivial constructors, etc.
> 
> The code is pretty complete, but the testing gets rather involved. There’s
> no reason to contain this if it’s available elsewhere. But if it isn’t I
> plan on continuing this…

I think Casey had prototyped something similar using a custom allocator, 
too, but I didn't actually look at the result.  And Matt talked about just 
pulling the boost one in-tree until we get updated boost in the supported 
distros, but I forget if he ran into problems there or not...

sage

[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux