
On 23/05/08 07:45 AM Giovanni Piero Deretta wrote:
On Fri, May 23, 2008 at 1:46 PM, dizzy <dizzy@roedu.net> wrote:
... protocol binary structures are never mapped directly in memory (you can with some compiler extensions but you won't gain anything since I/O is the bottleneck in such cases and not memory copy). Instead a serialization aproach should solve such issues.
With disk I/O this is certainly true, on the other hand, high speed LAN networks might actually be faster than (uncached) memory accesses (think for example 10G ethernet). Zero copy I/O is certainly an useful property.
Also, protocols aren't the only use case. For example, dealing with large binary files may involve memory-mapped disk i/o, in which case mapping directly structures accurately in memory is essential. Endian works very well for this, and I don't see a need for special serialization. --Neil