From 016e7817bedc58a3d7a2e0acdf50511b8b90c465 Mon Sep 17 00:00:00 2001 From: HedgehogInTheCPP Date: Wed, 16 Sep 2026 23:27:23 +0300 Subject: [PATCH] additional optimization of fraction reading for char. It's slow patch with really big numbers, so allow CPU to process it efficiently! --- include/fast_float/digit_comparison.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/fast_float/digit_comparison.h b/include/fast_float/digit_comparison.h index 435a2c8..6984837 100644 --- a/include/fast_float/digit_comparison.h +++ b/include/fast_float/digit_comparison.h @@ -347,6 +347,15 @@ parse_mantissa(bigint &result, const parsed_number_string_t &num) noexcept { } // process all digits, in increments of step per loop while (p != pend) { +#if defined(FASTFLOAT_64BIT_LIMB) && defined(FASTFLOAT_X86_SIMD) && \ + FASTFLOAT_X86_SIMD >= 31 + if FASTFLOAT_CONSTEXPR17 (sizeof(UC) == 1) { + if (!is_constant_evaluated() && (std::distance(p, pend) >= 16) && + (step - counter >= 16) && (max_digits - digits >= 16)) { + parse_sixteen_digits(p, value, counter, digits); + } + } +#endif while ((std::distance(p, pend) >= 8) && (step - counter >= 8) && (max_digits - digits >= 8)) { parse_eight_digits(p, value, counter, digits);