On Fri, Sep 23, 2016 at 10:25 AM, Jonathan Wakely wrote:
>
> I'm applying this patch, which is my one from 2014 with a check for
> whether the string is shared, so we just set the length to zero (and
> don't throw away reusable capacity) when it's not shared.
>
> Tested x86_64-linux, committed to
On 14/09/16 18:28 +0100, Jonathan Wakely wrote:
On 14/09/16 09:09 -0700, Cong Wang wrote:
On Wed, Sep 14, 2016 at 4:06 AM, Jonathan Wakely wrote:
On 13/09/16 11:02 -0700, Cong Wang wrote:
In !_GLIBCXX_USE_CXX11_ABI implementation, string::clear() calls
_M_mutate(), which could allocate memor
On Thu, Sep 15, 2016 at 2:08 AM, Jonathan Wakely wrote:
> On 14/09/16 10:41 -0700, Cong Wang wrote:
>>
>> For long term, I think gcc should have something as simple as
>> 'Signed-off-by' for Linux kernel, otherwise too much work for first-time
>> contributors like me. We all want to save time on t
On 14/09/16 10:41 -0700, Cong Wang wrote:
For long term, I think gcc should have something as simple as
'Signed-off-by' for Linux kernel, otherwise too much work for first-time
contributors like me. We all want to save time on this, don't we? ;)
Signed-off-by wouldn't help. The copyright assign
On Wed, Sep 14, 2016 at 10:28 AM, Jonathan Wakely wrote:
> On 14/09/16 09:09 -0700, Cong Wang wrote:
>>
>> On Wed, Sep 14, 2016 at 4:06 AM, Jonathan Wakely
>> wrote:
>>>
>>> If I understand the purpose of the change correctly, it's similar to
>>> https://gcc.gnu.org/ml/gcc-patches/2014-06/msg0027
On 14/09/16 09:09 -0700, Cong Wang wrote:
On Wed, Sep 14, 2016 at 4:06 AM, Jonathan Wakely wrote:
On 13/09/16 11:02 -0700, Cong Wang wrote:
In !_GLIBCXX_USE_CXX11_ABI implementation, string::clear() calls
_M_mutate(), which could allocate memory as we do COW. This hurts
performance when strin
On Wed, Sep 14, 2016 at 4:06 AM, Jonathan Wakely wrote:
> On 13/09/16 11:02 -0700, Cong Wang wrote:
>>
>> In !_GLIBCXX_USE_CXX11_ABI implementation, string::clear() calls
>> _M_mutate(), which could allocate memory as we do COW. This hurts
>> performance when string::clear() is on the hot path.
>>
On 13/09/16 11:02 -0700, Cong Wang wrote:
In !_GLIBCXX_USE_CXX11_ABI implementation, string::clear() calls
_M_mutate(), which could allocate memory as we do COW. This hurts
performance when string::clear() is on the hot path.
This patch improves it by using _S_empty_rep directly when
_GLIBCXX_FU