Boost logo

Boost :

Subject: Re: [boost] [endian] swap_in_place use case
From: Terry Golubiewski (tjgolubi_at_[hidden])
Date: 2010-06-04 13:05:38


Dave Handley wrote:
>>> You definitely don't want a copy in this case since your file could
>>> easily be
>>> very big. Think of the case where your file is huge (say 10Gb), you
>>> really
>>> don't want to perform a copy and swap since that puts your memory need
>>> at 20Gb
>>> instead of 10Gb.

If you're only going to access each element of the file, then converting
endian on access should be faster than swapping in place and then
processing, without needing double the memory.
Could you please give a specific example (preferably with code) that I could
play with?

terry


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