[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Why Mobile Apps Are Slow
- From: Coda Highland <chighland@...>
- Date: Tue, 30 Jul 2013 06:44:13 -0700
On Mon, Jul 29, 2013 at 11:58 PM, Ross Bencina
<rossb-lists@audiomulch.com> wrote:
> On 30/07/2013 10:51 AM, Coda Highland wrote:
>>
>> If your C++ vectors are getting copied around like that, your STL
>> implementation sucks. Good implementations provide copy-on-write
>> semantics or (as of C++11) move semantics.
>
>
> I'm pretty sure C++ std::vector is never implemented with COW. That would
> make array access on a vector more expensive than using a raw array.
>
> Even COW on std::string is not all its cracked up to be.
>
> Ross.
>
Which is why C++11 implements move semantics, which solves the problem
beautifully.
/s/ Adam