Boost logo

Boost :

Subject: Re: [boost] [string] proposal
From: Dean Michael Berris (mikhailberis_at_[hidden])
Date: 2011-01-29 12:31:13


On Sun, Jan 30, 2011 at 1:17 AM, Patrick Horgan <phorgan1_at_[hidden]> wrote:
>
> Just food for thought.  Have you guys thought about how this changes on a
> small memory constrained embedded device like a controller or a phone?
>

I have, and in those environments it's going to be a trade-off between:

* Whether you want to be able to deal with long strings and
concatenate them without having to have all that data be contiguous in
memory.

* Whether you just really need to use an in-memory buffer to deal with
data that's in storage, where you also need it to be mutable.

In the first case, you can still use the `chain` type and still get
the benefits of cheap concatenation. On the second case, use a
vector<char>. Of course though if your phone is using Linux (like on
Android) or FreeBSD (like on Apple (? wild guess here, not knowing
anything about the internals and just basing it on Mac OS X being
based on FreeBSD)) I'd say you have pretty much the same VMM tuned for
these devices and you'd get the same benefits even if it isn't NUMA.

HTH

-- 
Dean Michael Berris
about.me/deanberris

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