
On Monday, January 20th, 2025 at 12:48 PM, Glen Fernandes via Boost <boost@lists.boost.org> wrote:
I mentioned this to Matt, but I would like to see benchmarks comparing boost::decimal64_fast to a Decimal64 backed by Intel's DFP library, which is what I know to be in actual use today:
https://www.intel.com/content/www/us/en/developer/articles/tool/intel-decima...
Not that the benchmarks comparing to GCC's Decimal64 (which is based on the libbid which ships with libgcc) aren't useful, I personally don't know anyone using that today.
Benchmarks should ideally also include Intel's compiler, because at least one of the relevant parties who motivated me to suggest the Decimal64 library (to Vinnie as a potential project) do use the Intel C++ compiler (and their Fortran compiler) for areas where they perform better.
(The non-fast versions don't matter to me. I don't know anyone who would want to use them).
Glen
Here are some preliminary results: All tests run on an i9-11900k with Ubuntu 24.04 and the Intel(R) oneAPI DPC++/C++ Compiler 2025.0.4 (2025.0.4.20241205). The Intel benchmarks are written in C but should be a faithful port. Bottom line up front is the Intel library is an order of magnitude faster. Intel ===== Comparisons ===== Comparisons <Decimal32 >: 73831 us Comparisons <Decimal64 >: 76725 us ===== Addition ===== Addition <Decimal32 >: 81544 us Addition <Decimal64 >: 86667 us ===== Subtraction ===== Subtraction <Decimal32 >: 81736 us Subtraction <Decimal64 >: 86587 us ===== Multiplication ===== Multiplication <Decimal32 >: 81631 us Multiplication <Decimal64 >: 86939 us Proposal and built-in types ===== Comparisons ===== comparisons<float >: 73013 us comparisons<double >: 104019 us comparisons<dec32_fast >: 562165 us comparisons<dec64_fast >: 592997 us ===== Addition ===== Addition<float >: 78622 us Addition<double >: 74393 us Addition<dec32_fast >: 1164565 us Addition<dec64_fast >: 1045147 us ===== Subtraction ===== Subtraction<float >: 78787 us Subtraction<double >: 73223 us Subtraction<dec32_fast >: 1076833 us Subtraction<dec64_fast >: 920855 us ===== Multiplication ===== Multiplication<float >: 78457 us Multiplication<double >: 74345 us Multiplication<dec32_fast >: 1208233 us Multiplication<dec64_fast >: 803870 us This paper was linked in their readme: https://www.lirmm.fr/arith18/papers/CorneaM_Decimal_ARITH18.pdf. Their advantage seems to stem from leveraging lookup tables extensively. Matt