Boost logo

Boost :

From: Ivan Matek (libbooze_at_[hidden])
Date: 2025-01-21 17:56:21


On Tue, Jan 21, 2025 at 6:06 PM Peter Dimov <pdimov_at_[hidden]> 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.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk