All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sage Weil <sweil@redhat.com>
To: Allen Samuels <Allen.Samuels@sandisk.com>
Cc: ceph-devel@vger.kernel.org, mbenjami@redhat.com, cbodley@redhat.com
Subject: Re: inline vector container
Date: Wed, 3 Feb 2016 15:04:57 -0500 (EST)	[thread overview]
Message-ID: <alpine.DEB.2.11.1602031503230.28963@cpach.fuggernut.com> (raw)
In-Reply-To: <CY1PR0201MB189757D3C50DF09DDD8F2877E8D00@CY1PR0201MB1897.namprd02.prod.outlook.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1278 bytes --]

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

       reply	other threads:[~2016-02-03 20:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CY1PR0201MB189757D3C50DF09DDD8F2877E8D00@CY1PR0201MB1897.namprd02.prod.outlook.com>
2016-02-03 20:04 ` Sage Weil [this message]
2016-02-03 20:57   ` inline vector container Matt Benjamin
2016-02-03 21:21     ` Milosz Tanski
2016-02-03 21:24       ` Matt Benjamin
2016-02-03 21:26     ` Casey Bodley
2016-02-03 22:06       ` Allen Samuels
2016-02-03 22:10         ` Matt Benjamin
2016-02-04 12:06           ` Willem Jan Withagen
2016-02-04 14:42             ` Matt Benjamin
2016-02-04 17:01               ` Willem Jan Withagen
2016-02-04 17:03                 ` Matt Benjamin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.11.1602031503230.28963@cpach.fuggernut.com \
    --to=sweil@redhat.com \
    --cc=Allen.Samuels@sandisk.com \
    --cc=cbodley@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=mbenjami@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.