Endian order
dacut at neolinear.com
dacut at neolinear.com
Mon Apr 12 05:51:16 EST 2004
Sean Middleditch wrote:
>> When I was looking at the dbus specification, I noticed the endianness
>> option. I wonder why this was included in the specification instead
>> of using network byte order (big endian unless I am mistaken).
>
> As explained to me, it's more efficient. Having to swap data between
> local and network byte order (assuming they're different on your
> machine) is pointless when it's quite often your machine talking to
> itself. Also, it reduces the complexity and overhead of bus, as
> messages can just be passed around and not converted to and fro.
I would argue, actually, that the possibility of mixed endian-ness actually
increases complexity.
Nonetheless, I did study this with Wombeyan (the proprietary protocol I
wrote, which *does* translate everything to network-byte order). I found
that in our most common cases it doesn't make much of a difference. For
extremely large datasets which don't fit in the cache, however, keeping
things in network-byte-order can slow things down noticeably.
Unfortunately, we *did* end up occasionally transferring 0.25-1G datasets
across the wire...
More information about the dbus
mailing list