Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: your mail



On Mon, 23 Jun 2014 17:39:59 +0200 Vincent Lefèvre wrote:
> Note that for a network or file stream, one may prefer a
> character-based representation, as already specified.  This avoids
> some problems, as you know.  Then, what are the reasons to specify
> a binary format?  I don't remember that this question was raised.

Bulk data exchange.

> If this is for (memory + time) efficiency, then you want to keep
> the same memory representation as the IEEE 754 implementation
> (so, nothing really portable, but there are practical solutions
> to detect or announce the representations used in practice).

Right -- and this is why a completely-specified bit string, as the
current document appears to specify (as I pointed out, it it not
quite consistent, and Dima is trying to make it more consistent)
is probably not a good idea, as it would hamper exchange of bulk
data among like-minded systems (for those that don't match the
specified layout naturally).

The situation is not quite as dire as one might think, because
most systems have risen to the challenge posed by two ubiquitous
but incompatible external media:  PCI adapters, and TCP/IP headers.
So both Big-Endian and Little-Endian machines now have byte-reversing
Load and Store instructions in their ISA.  I just wish the ntoh/hton
family of macros had grown to accomodate 64-bit entities (128-bit?).

Michel.
---Sent: 2014-06-23 16:27:20 UTC