Boost logo

Boost :

Subject: Re: [boost] [boost::endian] Request for comments/interest
From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2010-05-27 10:23:31


On 27/05/10 15:04, Stewart, Robert wrote:
>> But even this is not true, as Beman's implementation will do a
>> copy as there is no in-place operations, as you bellow.
>
> I didn't realize I was bellowing about anything and I wasn't the one
> to introduce the idea of in-place swapping. Nevertheless, copying
> built-in types is trivial and should lend itself readily to
> optimization in many cases, so the difference should be small, if
> not zero.

If I may ask, do you use "Beman's implementation" to refer to copying
with unrolled loops?

I used the loops approach to craft endian-aware binary streams IO
carrying geometry objects, it was for Boost.Geometry, some time ago:

http://github.com/mloskot/workshop/blob/master/endian/endian.hpp

Best regards,

-- 
Mateusz Loskot, http://mateusz.loskot.net

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