
On Tuesday, January 21st, 2025 at 12:56 PM, Ivan Matek via Boost
On Tue, Jan 21, 2025 at 6:06 PM Peter Dimov pdimov@gmail.com wrote:
Basically, _fast types are almost never fast. Let's hope this curse doesn't afflict Decimal _fast types as well. :-)
Thank you for confirming this, now I regret not writing that also in
review. :)
To recap the discussion wrt pass by reference: points we agree on(wrt 64 bit x86):
- if we pass by value on Windows we are out of luck for most decimal types since there is ABI limitation for types greater than 8 bytes - use of uint16_fast_t in implementation pushed decimal64_fast over the limit of Linux ABI(16 bytes), _fast std:: types are not fast, would be nice to change this even if will not help on Windows
points we disagree on:
- pass by reference for large types (and if necessary mutate inplace) is still my prefered API. If we do want value returning functions then for large types I would prefer to pass args by const reference.
Not trying to change your mind, just recapping above discussion, doing all sizeof and ABI math is tricky.
Here's a data point on macOS ARM64:
Benchmarks on Current Develop:
===== Comparisons =====
comparisons