Re: [boost] [boost::endian] Request for comments/interest

"Scott McMurray" wrote:
On 28 May 2010 13:44, Cliff Green <cliffg@codewrangler.net<mailto:cliffg@codewrangler.net>> wrote:
Studies have been performed comparing "receiver makes right" designs (where
swapping is only performed by the receiver, if needed) with others. The
costs of swapping on modern processors is pretty minimal compared with the
design overhead and complexity, so "receiver makes right" many times is not
justified.
I understood it more as "we use little-endian for our network format,
since most of our machines are little-endian, but still want to allow
things to work on the couple of big-endian machines", not as "receiver
makes right".
I need to reiterate that I was not talking about a "receiver makes right" design. I don't like these at all for complexity reasons. But in this day and age when a significant percentage of computers being sold are little-endian, deciding to make an internal protocol little-endian and almost completely eliminating endian swaps can make a lot of sense. If you are processing data off multiple 10Gb Ethernet feeds simultaneously, removing a single copy can make all the difference. Especially when you consider memory bandwidth constraints on a multi-threaded process. If you consider the hoops that C++0x has tried to jump through to make move semantics work, removing unnecessary copies, especially in a low level process, seems to be important to a lot of people. Dave
participants (1)
-
Dave Handley