662 Commits

Author SHA1 Message Date
HedgehogInTheCPP
e9a7d667ca additional noexcept and fix for constexpr 2026-08-18 01:28:32 +03:00
HedgehogInTheCPP
63aea712de latest try to fix compilation. After this I remove all outdated workflows completely. 2026-08-18 01:13:34 +03:00
HedgehogInTheCPP
97e5a8b7b1 fix constexpr for old standards. 2026-08-18 00:57:40 +03:00
HedgehogInTheCPP
ee25fec2b7 lint unfck 2026-08-18 00:28:53 +03:00
HedgehogInTheCPP
39de1458e3 constexpr fix. 2026-08-18 00:18:20 +03:00
HedgehogInTheCPP
5e7936a02a cleanup 2026-08-18 00:06:53 +03:00
HedgehogInTheCPP
371a224039 fix 2026-08-17 23:29:36 +03:00
HedgehogInTheCPP
32f5fe73b9 final fix. 2026-08-17 23:09:22 +03:00
HedgehogInTheCPP
e3da5082dd fix. 2026-08-17 22:33:09 +03:00
HedgehogInTheCPP
055f966c76 lint unfck 2026-08-17 22:13:35 +03:00
HedgehogInTheCPP
8e954fada3 fix 2026-08-17 22:06:46 +03:00
HedgehogInTheCPP
da875ff9cf fixes for old standards. 2026-08-17 21:54:19 +03:00
HedgehogInTheCPP
5d65edb6cd added cross platform and cross compiler parse_digits_until_19 and cleanup related code. 2026-08-17 21:36:11 +03:00
HedgehogInTheCPP
deada1436d cleanup 2026-08-17 20:02:12 +03:00
HedgehogInTheCPP
37d25dd546 Continue rework of the FASTFLOAT_X86_SIMD realization: cleanup and improvements.
Improvements in the FASTFLOAT_ISNOT_CHECKED_BOUNDS switch: cleanup more.
cleanup if constexpr usage.
2026-08-17 19:46:05 +03:00
HedgehogInTheCPP
a883161d7e cleanup 2026-08-17 17:47:32 +03:00
HedgehogInTheCPP
936d28486e small fix for constexpr 2026-08-17 04:38:43 +03:00
HedgehogInTheCPP
d2f5be8549 cleanup 2026-08-17 04:37:12 +03:00
HedgehogInTheCPP
39b6b8393e cleanup 2026-08-16 18:41:32 +03:00
HedgehogInTheCPP
6d6442ae54 lint unfck. 2026-08-14 20:34:22 +03:00
HedgehogInTheCPP
1870ae71e7 * cleanup. 2026-08-14 01:43:26 +03:00
HedgehogInTheCPP
d33395ac1a cleanup. 2026-08-14 01:33:14 +03:00
HedgehogInTheCPP
a847788226 There's research on the very beginning stage.
Added improvements and modernize SSE code and enable vectorization for char.
Add more detection of x86 architecture and allow user, for example if MSVC is used set the level manually: used new macro FASTFLOAT_X86_SIMD and available only if FASTFLOAT_SSE_PATCH_REWORK is enabled.
Rename FASTFLOAT_NEON to FASTFLOAT_ARM_NEON for consistency.
2026-08-13 23:10:11 +03:00
IRainman
b73cda56f3 * small cleanup for the long path 2026-08-06 20:58:51 +03:00
IRainman
068e36510b lindt unfck 2026-08-02 19:52:10 +03:00
IRainman
5721996a33 Merge branch 'main' of https://github.com/fastfloat/fast_float 2026-07-19 01:08:18 +03:00
Daniel Lemire
f6df0f2917
Merge pull request #398 from redis-performance/exp062-063-combo
Enable the 4-digit SWAR follow-up on GCC + skip the rounding-mode probe for long mantissas
2026-07-13 15:13:16 -04:00
IRainman
7b9159ae51 * signed/unsigned mismatch fix. 2026-07-07 16:37:17 +03:00
IRainman
e1bc8fc297 * cleanup and slightly optimize slower path. 2026-07-07 16:15:21 +03:00
IRainman
97368a033d * cleanup and optimize more. 2026-07-07 10:29:54 +03:00
IRainman
8646b4fd97 # lin
t unfck
2026-07-06 23:05:18 +03:00
IRainman
5324d7c5d7 * added crutch for compilers that do not properly support constexpr if 2026-07-06 22:49:21 +03:00
IRainman
b3895bd250 # cleanup 2026-07-06 22:27:41 +03:00
IRainman
b6c92139d7 # cleanup 2026-07-06 22:12:02 +03:00
IRainman
a7a783c8c8 # compilation fix after renaming 2026-07-06 21:19:24 +03:00
IRainman
79ef21000b # cleanup 2026-07-06 20:56:27 +03:00
IRainman
85c9f84fc4 * copy-past cleanup. 2026-07-06 16:54:34 +03:00
IRainman
fa48089012 * const fixes for merged code. 2026-07-05 22:13:55 +03:00
IRainman
72d3f6c1de * type usage fix in merged code 2026-07-05 22:00:35 +03:00
IRainman
cd4aafd2f6 # alignment next step performance: original now perform my program test for 133704ms and my fork give more significant performance improve than before: 105259ms. 2026-07-05 20:49:18 +03:00
IRainman
eef7133edc Merge branch 'main' of https://github.com/fastfloat/fast_float 2026-07-05 20:14:17 +03:00
fcostaoliveira
5082489e35 EXP-063: test the mode-independent mantissa bound before the rounds_to_nearest probe 2026-07-03 14:34:47 +01:00
fcostaoliveira
f4f36e04f7 EXP-062: enable the 4-digit SWAR fraction follow-up on all compilers (drop __clang__ gate) 2026-07-03 14:34:47 +01:00
sahvx655-wq
c539b5399c guard is_space against negative signed code units 2026-06-18 19:51:56 +05:30
Daniel Lemire
34164f547b 8.2.10 2026-06-14 09:52:47 -04:00
Daniel Lemire
a7249f86ed replace checked re-parse with O(1) simdjson-style overflow check
The previous commit detects multi-wrap u64 overflow at the max_digits
boundary by re-parsing the digits through a checked multiply-add loop
(O(max_digits)). Replace that with the constant-time check used in
simdjson: the leading digit plus a single threshold comparison.

For a max_digits-length value, min_safe_u64(base) == base^(max_digits-1)
is the smallest such value and also the width of each leading-digit band
[d*ms, (d+1)*ms). Since that width is < 2^64, the only band that can
straddle 2^64 is d == dmax (the largest leading digit that still fits),
and there it straddles at most once, so a single threshold dmax*ms
separates wrapped from non-wrapped values. A leading digit above dmax
always overflows; below dmax always fits. dmax and the threshold derive
from the existing min_safe_u64 table, so no new tables are needed and
dmax*ms cannot itself overflow.

Add a programmatic, self-verifying test for parse_int_string overflow
detection covering bases 2..36, complementing the hand-picked strings
added earlier. Every generated input is cross-checked against an
independent trusted oracle (a plain 64-bit checked multiply-add); on
success the parsed value is also compared exactly and full consumption
of the input is asserted.

Per base it exercises:
  - an exact-boundary sweep of the 64 values straddling 2^64
    (UINT64_MAX-31 .. 2^64+31), built by walking the digit string;
  - UINT64_MAX, 2^64 and the all-max-digit value, each also with
    leading zeros;
  - random max_digits-length values across every leading digit, with
    the heaviest sampling on the lead == dmax band that straddles 2^64,
    and full coverage of lead > dmax (the multi-wrap region the naive
    min_safe check accepted by mistake);
  - max_digits-1 (never overflows) and max_digits+1 (always overflows).
A small signed (int64_t) section checks the exact INT64_MIN/INT64_MAX
limits round-trip and that INT64_MAX+1 / INT64_MIN-1 are rejected in
every base.
2026-06-13 21:34:34 -04:00
sahvx655-wq
632cc97b5b detect uint64 overflow that wraps past min_safe in parse_int_string 2026-06-13 21:21:29 -04:00
Daniel Lemire
8234a89623 8.2.9 2026-06-11 20:29:24 -04:00
Daniel Lemire
0dce102cb4
Merge pull request #391 from sahvx655-wq/int-fast-path-wide-units
reject non-digit wide code units in uint8/uint16 integer fast path
2026-06-11 20:28:10 -04:00
Joao Paulo Magalhaes
8e6edc8ad2
Fix compile error with gcc 9: use of [[unlikely]] 2026-06-10 15:37:26 +01:00