Consider Binary Serialization for Floating Points #76

Neverlord opened this Issue Oct 1, 2012 · 2 comments


None yet

2 participants


libcppa currently serializes floating points as strings in order to be platform transparent. However, ArtemGr pointed out that it might be portable to use a binary format: 7331498#commitcomment-1878860.

If there's no platform (ARM? PowerPC?) with different floating point representation, then there's no point in using strings.

ArtemGr commented Oct 2, 2012

Might keep the existing code as a compile-time option.


libcppa now uses IEEE 754 encoding on the network as a compromise between performance and platform-independency for float and double (based on, but falls back to string serialization for long double. Reason being is that long double would be packed into a std::uint128_t ... which does not exist. Boost has such types in its multiprecision library, but adding boost only for this purpose might be overkill. Nevertheless, I am thinking of some type of uint128 type in the future, since strings are definitely not the answer.

@Neverlord Neverlord closed this Oct 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment