
On Monday, January 20th, 2025 at 12:48 PM, Glen Fernandes via Boost
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