Boost logo

Boost :

Subject: Re: [boost] [Containers] String performance and compatibility
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2011-08-05 01:59:33


El 05/08/2011 1:44, Phil Endecott escribió:
> Hi Ion,
>
> I see that your string implementation has a small buffer optimisation
> (SBO). Have you tried to benchmark this, and/or any of the other design
> decisions? I vaguely recall that libc++ may have done some measurements
> but I can't find anything now.

I havent' measured it thoroughly. It's based on the same ideas libc++
uses, and I have no other non-SBO implementation to compare. Maybe an
easy task is to compare this string with other standard libraries that
use SBO.

> Also, have you considered adding e.g. a ctor that takes a std::string,
> for interoperability? (I guess the same could be asked for the other
> types.)

That might be a good addition if there is consensus for that. You can
just use target.assign(src.begin(), src.end()) but I think the
constructor could optimize some conversions, like ordered containers.

Ion


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