I've released mpdecimal-2.5.0:
Starting with Python 3.9, this version should be used for an external libmpdec.
Python versions 3.7 and 3.8 should use the previous version mpdecimal-2.4.2.
libmpdec will continue to evolve conservatively. For the few changes, see:
mpdecimal now includes libmpdec++. libmpdec++ is a complete C++ implementation of the General Decimal Arithmetic Specification.
The library frees users from manual memory management and has an easy API with inline operators similar to the one in Python's decimal module. Like Python's decimal module, libmpdec++ has a thread local context for inline operators and other functions that use the implicit context.
Depending on the compiler, the speed penalty for the C++ features compared to libmpdec is 4-10%.
The best compiler I found is gcc (GCC) 9.2.1 20190827 (Red Hat 9.2.1-1), closely followed by the latest Intel compiler. Both produce the fastest libmpdec code and have a speed penalty for C++ of 4%.
Like libmpdec, libmpdec++ has a large test suite. In addition to the mpdecimal tests, libmpdec++ has been tested by replacing all libmpdec functions in Python's decimal module with libmpdec++ functions.
libmpdec++ passes both the Python test suite and deccheck.py.
For a short libmpdec++ introduction, see: