Subject: Re: [boost] [Endian] Performance
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2011-09-07 08:14:29
On 07/09/2011 13:12, Stewart, Robert wrote:
> Mathias Gaunard wrote:
>> On 09/07/2011 01:54 AM, Phil Endecott wrote:
>>> You mean the performance of these endian operations in
>>> general is not important?
>> Not that much no. It's important that it's reasonably fast,
>> but it needn't be performance critical.
> Examples were given recently of swapping bytes in large data sets, where each extra cycle quickly accumulates into noticeable delays. Another example arises in high frequency trading where latency is of the utmost importance. Every little bit that can be shaved off the critical path, of which byte swapping often is a part, can mean the difference between making money or not. Thus, performance of low level functions like these can be critical.
Why not avoid swapping bytes entirely, by converting the data set to
native byte ordering offline, or by choosing to transmit the data in the
native byte ordering?
But I'll take your word for it that it is indeed necessary, and a
measurable overhead compared to I/O.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk