[squid-dev] [PATCH] Faster SBuf::append

2016-10-06 Thread Alex Rousskov
Hello, The attached optimization patch was inspired be reviewing the following code: > Parser::parse(const SBuf &aBuf) ... > if (preservedData_.isEmpty()) > preservedData_ = aBuf; // avoid needless memory allocation > else > preservedData_.append(aBuf); Supporting this kind of optimi

Re: [squid-dev] [PATCH] Faster SBuf::append

2016-10-06 Thread Amos Jeffries
On 7/10/2016 5:01 a.m., Alex Rousskov wrote: > Hello, > > The attached optimization patch was inspired be reviewing the > following code: > >> Parser::parse(const SBuf &aBuf) > ... >> if (preservedData_.isEmpty()) >> preservedData_ = aBuf; // avoid needless memory allocation >> else >>

Re: [squid-dev] [PATCH] Faster SBuf::append

2016-10-06 Thread Alex Rousskov
On 10/06/2016 10:57 AM, Amos Jeffries wrote: > Please add a check to the unit test testSBuf::testAppendSBuf() > to guarantee that the (*this = S) assignment code path updates the store > reference count rather than doing a bit-wise copy of the SBuf. I support that addition but do not have the tim

Re: [squid-dev] [PATCH] Faster SBuf::append

2016-11-04 Thread Amos Jeffries
On 7/10/2016 6:20 a.m., Alex Rousskov wrote: > On 10/06/2016 10:57 AM, Amos Jeffries wrote: > >> Please add a check to the unit test testSBuf::testAppendSBuf() >> to guarantee that the (*this = S) assignment code path updates the store >> reference count rather than doing a bit-wise copy of the SB

Re: [squid-dev] [PATCH] Faster SBuf::append

2016-11-04 Thread Alex Rousskov
On 11/04/2016 08:22 AM, Amos Jeffries wrote: > On 7/10/2016 6:20 a.m., Alex Rousskov wrote: >> On 10/06/2016 10:57 AM, Amos Jeffries wrote: >> >>> Please add a check to the unit test testSBuf::testAppendSBuf() >>> to guarantee that the (*this = S) assignment code path updates the store >>> referenc