[Xapian-tickets] [Xapian] #673: Use IEEE-754 interchange format?
Xapian
nobody at xapian.org
Tue Jan 29 21:24:34 GMT 2019
#673: Use IEEE-754 interchange format?
----------------------------+---------------------------
Reporter: olly | Owner: nobody
Type: defect | Status: new
Priority: normal | Milestone: 1.5.0
Component: Backend-Remote | Version:
Severity: normal | Resolution:
Keywords: GoodFirstBug | Blocked By:
Blocking: | Operating System: All
----------------------------+---------------------------
Comment (by olly):
A slightly more concrete plan:
* Using little-endian IEEE-754 format makes most sense as that's the
dominant format for current platforms (notably used by x86, x86-64, and
common configurations of arm). For these platforms we then just need to
copy the bytes in the new versions of `serialise_double()` and
`unserialise_double()`.
* For platforms with big-endian IEEE-754 we just need to byte-swap when
doing that copying. There's already a helper `do_bswap()` which handles
this efficiently (by using compiler built-ins or similar where available).
* For the (currently rare) platforms using a non-IEEE-754 format we'll
need a pair of utility functions to convert between the native format and
little-endian IEEE-754 format. The current `serialise_double()` and
`unserialise_double()` should provide some hints as to how to implement
those.
I'd suggest getting this working for IEEE-754 platforms first, then
worrying about the others as a second step.
--
Ticket URL: <https://trac.xapian.org/ticket/673#comment:4>
Xapian <https://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list