Subject: Re: [boost] [xint] Third release is ready, requesting preliminary review
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2010-05-03 13:37:09
> Stewart, Robert wrote :
> > DE wrote:
> >> but i see no conflict between those two statements
> > There is no conflict other than that your response was directed to
> > my statement that the COW overhead was superfluous in the context I
> > addressed. Thus, using COW to satisfy the stated example
> > pessimized the code.
> it does indeed
> but the pessimization is negligible compared to the cost of an
> operation itself
We've been discussing whether COW is needed. The example cited didn't justify it, so any overhead it adds is unnecessary. We're awaiting word on what may be wrong with the application of move semantics to explain why COW is needed. If that rectifies the situation, then COW should be removed. If not, keep it. I've never argued that it must be removed. I just refuted the one example provided and wondered if there was a problem with the move semantics.
> i suddenly have remebered a rule on optimization: measure,
> then optimize
> in other words: find a bottleneck and only then optimize the
> code causing it
That's exactly what Chad did. That's why he added COW. With the addition of move semantics, there's reason to think it shouldn't be needed.
> in this thread things look the other way around
> you guys make a guess and ask to change/optimize the code using that
> guess as the basis
> sorry, i consider it wrong
There is nothing wrong with trying to poke holes in a design or implementation. From experience, we know that COW is usually a pessimization rather than an optimization in MT code, so it is usually avoided altogether for simplicity. Its need raises red flags. When the tests suggest that the library is truly faster with COW, we're a little skeptical and want to understand why. This is the scientific method in action.
> in fact it must be like this:
> - i use it in a <usecase>, i profiled it and found a bottleneck in the
> following piece of code...
> otherwise there is a big chance we are wasting each others time making
> guesses and arguing about implementation details
> because optimizations born from that may be worthless
I disagree. The COW issue will be raised during review. Chad needs to be ready to defend its use then. Having done so now means he can explain it in the docs and avoid such discussions during the review.
Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP http://www.sig.com
IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.