Matt, do we have benchmarks comparing yours to the decimal64 implementation in GCC? i.e. The C++ std::decimal::decimal64 in
as well as
the C _Decimal64 (https://gcc.gnu.org/onlinedocs/gcc/Decimal-Float.html) Those are backed by Intel's BID library.
Not yet, but I will add them. Our focus has been on ensuring correctness first, and only recently began optimizing routines for performance.
Your implementation of decimal64 also stores a uint64_t of the IEEE 754 Decimal64 (presumably BID not DPD) format, correct?
Correct, we use the BID format.
This also means that on every operation you have to decode significand, exponent, sign out of this - which isn't trivial given the format.
It's a series of bit-fiddling operations: https://github.com/cppalliance/decimal/blob/develop/include/boost/decimal/de.... Encoding from significand, exponent and sign is a much harder operation: https://github.com/cppalliance/decimal/blob/develop/include/boost/decimal/de... Matt