|
Boost : |
From: Matt Borland (matt_at_[hidden])
Date: 2025-01-20 20:56:44
On Monday, January 20th, 2025 at 2:29 PM, Fernando Pelliccioni via Boost <boost_at_[hidden]> wrote:
>
>
> On Wed, Jan 15, 2025 at 10:34â¯AM John Maddock via Boost <
> boost_at_[hidden]> wrote:
>
> > The review of the proposed Decimal Number library by Matt Borland and
> > Chris Kormanyos begins today and runs until 22nd Jan.
> >
> > You will find documentation here:
> > https://cppalliance.org/decimal/decimal.html
> >
> > And the code repository is here: https://github.com/cppalliance/decimal/
>
> Hi everyone,
>
> First of all, a big thank you to Matt and Chris for your hard work, I
> personally find this library very useful.
> Here are a few quick comments:
>
> 1. Literals
> I agree with earlier suggestions about placing them in a separate
> namespace, such as boost::decimal::literals, rather than boost::decimal.
> This matches typical Boost conventions.
>
> 2. Headers
> I also concur with the feedback regarding compile times. Relying
> exclusively on <boost/decimal.hpp> can be slow. Please provide smaller
>
> headers.
>
There are issues open for 1 and 2 to be addressed.
> 3. Fast vs. Non-Fast Variants
> I think the authorsâ choice of default is probably fine, though Iâm not
> 100% certain. In any case, clearer documentation on when to pick the
> standard type vs. the fast variant would be really helpful. Some guidance
> on weighing storage vs. speed would benefit end users.
>
> 4. <cstdio> Support
>
> I share the concerns about potentially unsafe functions and limited
> specifier support. Maybe focusing on <format> (for C++20) or a safer,
>
> custom formatter would be more straightforward and less error-prone.
>
I think pushing people to charconv is the better move. <format> support needs GCC >= 13, Clang >= 18, or _MSC_VER >= 1940. That's a high bar for a C++14 library.
> 5. Concepts
> If the Concepts defined here are intended for user code, I agree they
> should be public and documented. I would like to use them in my C++20 (and
> beyond) code.
>
> 6. Hardware Decimal Support
> I don't see explicit mention of how this library could leverage hardware
> decimal capabilities, but I imagine that could be added in the future,
> possibly via a pull request from someone who has access to that hardware.
> It is a nice to have feature but not a must have. I would not stop the
> library from being released without it.
>
> 7. Compiler-Explorer support
> It would be great if this library was supported on Compiler-Explorer for
> doing some testing. I know it is not related to the library but it helps a
> lot for reviewing it.
>
> 8. Benchmarks
> I plan to run some additional benchmarks on my own machines.
> One thing I'm curious about is how the built-in GCC _Decimal32/_Decimal64
> types compare. Do they behave more like the "standard" or the fast variants
> in practice?
>
"Standard", but I will note the behavior of the decimalXX, and decimalXX_fast are identical except the latter does not support sub-normals.
> Thanks again! I think this library is shaping up wonderfully and can't wait
> to see how it evolves.
>
> Best,
> Fernando
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk