Boost logo

Boost :

Subject: Re: [boost] [boost::endian] Request for comments/interest
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2010-06-03 07:11:12


Terry Golubiewski wrote:
> Rob Stewart wrote:
> >
> I do not agree that the entire message should be
> swapped-in-place unless performance is critical.

I stated as much in a previous post by saying I could imagine some preferring to use the object-based approach until performance was known to be an issue and then switching to the function-based approach.

> > Your code could be as efficient as using Tomas' swap(), but not
> > swap_in_place(), I think. Measurements are good.
>
> Good prediction! The type-based code is more efficient than
> Tomas' swap() but less efficient than swap_in_place.

I think you'll find the test, as crafted, mislead you. Swap will prove at least as efficient when corrected.

_____
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.


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