655 Commits

Author SHA1 Message Date
IRainman
299c2741bc copy-past fix and type usage fixes. 2026-01-13 18:44:54 +03:00
IRainman
b28862bbaa Merge branch 'main' of https://github.com/fastfloat/fast_float 2026-01-13 17:43:21 +03:00
Shikhar
b14e6a466a simpler optimizations
Signed-off-by: Shikhar <shikharish05@gmail.com>
2026-01-02 05:21:01 +05:30
Shikhar
13d4b94183 small fix 2026-01-02 05:21:01 +05:30
Shikhar
d0af1cfdbd optimize uint16 parsing
Signed-off-by: Shikhar <shikharish05@gmail.com>
2026-01-02 05:21:01 +05:30
Daniel Lemire
d5bc4e1b2e
Merge pull request #358 from shikharish/uint8-base-fix
add base check for uint8
2025-12-31 13:44:12 -05:00
Daniel Lemire
97b54ca9e7 v8.2.2 2025-12-31 13:12:46 -05:00
Shikhar
4dc5225797 add base check for uint8 parsing
Signed-off-by: Shikhar <shikharish05@gmail.com>
2025-12-31 22:07:45 +05:30
Shikhar
fb522b66d0 fix endianess bug in uint8 parsing
Signed-off-by: Shikhar <shikharish05@gmail.com>
2025-12-31 21:51:23 +05:30
IRainman
f5d44c73e4 compilation fix. 2025-12-30 21:02:50 +03:00
IRainman
48abeebc5a byteswap isn't compiling properly, no nay crutches that I try not help, including usage cpp20_and_in_constexpr. 2025-12-30 20:41:30 +03:00
IRainman
ba656ace78 improvements in the code generation for byteswap and leading_zero to all compilers. 2025-12-30 20:15:17 +03:00
sleepingieght
4eb0d806fa add specialisations 2025-12-30 20:27:45 +05:30
IRainman
f9bac93deb type usage fix. 2025-12-30 01:04:02 +03:00
IRainman
3d69a9593e type usage fix. 2025-12-30 00:45:13 +03:00
IRainman
fcdb5869d4 cleanup in the API. 2025-12-30 00:39:02 +03:00
IRainman
cd61547b63 FASTFLOAT_HAS_BIT_CAST fix for old standards. 2025-12-30 00:11:16 +03:00
IRainman
051d15119e small performance improvement after full cleanup. 2025-12-29 23:57:28 +03:00
IRainman
f92d7fb594 Merge branch 'main' of https://github.com/fastfloat/fast_float 2025-12-29 23:43:27 +03:00
IRainman
7ca9c84708 type usage fixes. 2025-12-29 23:02:07 +03:00
sleepingieght
265cb849f3 optimise fastfloat_strncasecmp 2025-12-30 01:15:22 +05:30
IRainman
41d9632abc interface cleanup. 2025-12-29 21:12:11 +03:00
IRainman
f556a6875f cleanup. 2025-12-29 19:47:43 +03:00
IRainman
9a0fa4733c cleanup. 2025-12-29 19:41:17 +03:00
IRainman
f4cae22b6e type usage fix. 2025-12-29 19:25:10 +03:00
IRainman
611cd927f1 type usage fixes. 2025-12-29 19:17:25 +03:00
IRainman
8330f851f6 type usage fixes. 2025-12-29 19:15:15 +03:00
Daniel Lemire
11ce67e5eb v8.2.1 2025-12-29 11:09:40 -05:00
IRainman
0d423367a5 type usage fixes. 2025-12-29 19:08:10 +03:00
IRainman
35bca9cb34 type usage fixes. 2025-12-29 19:03:15 +03:00
Daniel Lemire
f4f9da1e6b fix for issue 354 2025-12-29 10:55:20 -05:00
IRainman
351e4d30ab type usage fixes. 2025-12-29 18:48:28 +03:00
IRainman
147cf3b4c7 type usage fix and cleanup. 2025-12-29 18:23:06 +03:00
IRainman
38d0ab3f8e initialization cleanup. 2025-12-29 17:48:38 +03:00
IRainman
a28e112d8f initialization cleanup. 2025-12-29 17:29:03 +03:00
IRainman
5857b98bfd some warnings fix in CI builds. 2025-12-29 16:43:54 +03:00
IRainman
59da568ec6 type usage fix. 2025-12-29 16:31:32 +03:00
IRainman
dad07cc054 initialization cleanup and improve caches usage. 2025-12-29 16:17:44 +03:00
IRainman
ebc2ee8ceb optimization for the report_parse_error. 2025-12-29 00:06:46 +03:00
IRainman
054004f779 cleanup and type usage fixes. 2025-12-28 23:24:24 +03:00
IRainman
37152ead57 type usage fixes. 2025-12-28 21:52:57 +03:00
IRainman
489703f99d type usage fixes. 2025-12-28 19:59:46 +03:00
IRainman
8f49511980 noexcept 2025-12-28 19:57:45 +03:00
IRainman
5c6a6c2742 type usage fixes. 2025-12-28 18:35:11 +03:00
IRainman
5bc96372bd type usage fixes.
fix for FASTFLOAT_ISNOT_CHECKED_BOUNDS if FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN isn't enabled.
2025-12-28 17:41:04 +03:00
IRainman
62bc4b4458 type usage fixes. 2025-12-28 14:16:14 +03:00
IRainman
c1265cf9ed Merge branch 'main' of https://github.com/fastfloat/fast_float 2025-12-28 14:08:05 +03:00
Daniel Lemire
dd77fb5e4c v8.2.0 2025-12-27 12:08:58 -05:00
Daniel Lemire
b4d26ec866 v8.1.1 2025-12-27 12:06:36 -05:00
IRainman
812d89ec9b type usage fixes. 2025-12-27 15:55:58 +03:00
IRainman
fb1e92c0e2 code cleanup and type usage fixes. 2025-12-27 15:42:58 +03:00
IRainman
22605807b8 fix compilation error in uint8_t parsing. 2025-12-27 13:01:56 +03:00
IRainman
3745f4b009 * documentation in the code updated, fixed errors with parsing some special very big exponent numbers. 2025-12-27 12:56:51 +03:00
Pavel Novikov
cb813a7765
fixed UB 2025-12-27 00:15:30 +03:00
IRainman
7ce53435fc try again. need test refactoring. 2025-12-26 22:11:13 +03:00
IRainman
8a518f4308 am_pow_t is probably needs to be 64 bit because some hard coded values that I can't find. 2025-12-26 22:05:09 +03:00
IRainman
54d1f5afcf fucking lint 2025-12-26 01:07:59 +03:00
IRainman
350ad6ecac unfck lint 2025-12-26 00:22:44 +03:00
IRainman
d07362c459 Final review for a more simple merge.
Feature FASTFLOAT_TABLE_HACK_CHAR_DIGIT_LUT_DISABLED is removed because hex and bin parsing isn't working properly.
Properly use FASTFLOAT_SIMD_DISABLE_WARNINGS and FASTFLOAT_SIMD_RESTORE_WARNINGS only for instructions that allow unaligned loads.
2025-12-26 00:13:41 +03:00
IRainman
074fdeac74 small fix 2025-12-25 19:21:17 +03:00
IRainman
9ff1624d92 small fix. 2025-12-25 19:17:12 +03:00
IRainman
e88d9ae427 FASTFLOAT_HAS_BYTESWAP cleanup. 2025-12-25 16:47:56 +03:00
IRainman
a8c78f4403 unfck lint. 2025-12-25 15:15:25 +03:00
IRainman
2aba1685b0 * optimize layout of the parsed_number_string_t. 2025-12-25 14:36:51 +03:00
IRainman
b7fb05b843 * Added additional compile option FASTFLOAT_TABLE_HACK_CHAR_DIGIT_LUT_DISABLED for improve cache usage in high load.
* Small optimization in code generation for auto vectorization.
2025-12-25 14:04:04 +03:00
IRainman
7041f91d47 Merge branch 'main' of https://github.com/fastfloat/fast_float 2025-12-25 11:33:24 +03:00
IRainman
600f236fd8 * Small optimization in code generation for auto vectorization. 2025-12-25 11:16:13 +03:00
IRainman
f42c8802af * enable warning in GCC because PVS-Studio are also detect this. This is an error! 2025-12-25 01:12:02 +03:00
IRainman
65810ebfd3 * enable warning in GCC because PVS-Studio are also detect this. This is an error! 2025-12-25 00:21:42 +03:00
Shikhar
780c341359 fix macro
Signed-off-by: Shikhar <shikharish05@gmail.com>
2025-12-25 00:45:51 +05:30
Shikhar
fdb0eddf99 c++14 constexpr
Signed-off-by: Shikhar <shikharish05@gmail.com>
2025-12-25 00:45:51 +05:30
Shikhar
fce0ab61df uint8_t parsing
Signed-off-by: Shikhar <shikharish05@gmail.com>
2025-12-25 00:45:51 +05:30
IRainman
588623e076 * type usage fix for better performance in any hardware. 2025-12-08 23:59:29 +03:00
IRainman
d697541b2a Merge branch 'main' of https://github.com/fastfloat/fast_float 2025-12-04 04:40:40 +03:00
Raine 'Gravecat' Simmons
9d78a01ff7
Fixed formatting with clang-format 2025-11-22 21:53:37 +00:00
Raine 'Gravecat' Simmons
409d6215b4
Fixes compilation on GCC/MinGW 2025-11-22 16:11:06 +00:00
IRainman
3d46d99cdf # warning fix. 2025-11-21 18:19:06 +03:00
IRainman
3685667dd2 * FASTFLOAT_HAS_BIT_CAST cleanup. 2025-11-19 22:13:24 +03:00
IRainman
843aa3f703 * improvements in compiler function detection. 2025-11-12 14:58:15 +03:00
IRainman
c9d0ac0084 # cleanup. 2025-11-10 03:49:27 +03:00
IRainman
b8163709f5 * type usage fix for better performance in any hardware. 2025-11-10 02:41:26 +03:00
IRainman
497e65b03f * Added separate config macros FASTFLOAT_ISNOT_CHECKED_BOUNDS. 2025-11-09 19:08:11 +03:00
IRainman
959c9531ea # cycles (for and while) cleanup in low level for the best compiler optimization and the best runtime. 2025-11-09 18:13:17 +03:00
IRainman
b9d91e7f34 * code cleanup. 2025-11-09 17:22:13 +03:00
IRainman
e109eedd35 * try to fix error on x86 platform step3. 2025-11-09 17:21:52 +03:00
IRainman
3ae6d3c2b3 # unfck lint 2025-11-09 16:40:44 +03:00
IRainman
d0c7def24d * try to fix error on x86 platform step2. 2025-11-09 16:38:57 +03:00
IRainman
80902aa90c * try to fix error on x86 platform step1. 2025-11-09 16:34:07 +03:00
IRainman
a92f025df7 * type usage fix 2025-11-08 23:59:52 +03:00
IRainman
3e498bb3b1 * try to fix precision error on x86 platform step9. 2025-11-08 22:28:40 +03:00
IRainman
97aa629922 * try to fix precision error on x86 platform step8. 2025-11-08 22:15:17 +03:00
IRainman
1ba0d482c1 * try to fix precision error on x86 platform step7. 2025-11-08 22:01:14 +03:00
IRainman
df6b574e40 * try to fix precision error on x86 platform step6. 2025-11-08 21:38:15 +03:00
IRainman
cd62aadb1b * try to fix precision error on x86 platform step5. 2025-11-08 21:26:31 +03:00
IRainman
578b1e9898 * try to fix precision error on x86 platform step4. 2025-11-08 21:19:23 +03:00
IRainman
77ef46838c * try to fix precision error on x86 platform step3. 2025-11-08 19:40:24 +03:00
IRainman
e96afe608e * try to fix precision error on x86 platform step2. 2025-11-08 19:25:53 +03:00
IRainman
e6f2bf13b4 # test failed. 2025-11-08 19:09:45 +03:00
IRainman
62b60e0040 # Disable FASTFLOAT_HAS_BYTESWAP: step to try to fix precision error on x86 platform 2025-11-08 18:29:14 +03:00
IRainman
56d423399d * Improving in code generation -> speedup.
* fix warning in 32 bit build.
2025-11-08 18:14:39 +03:00
IRainman
0c4171eb26 # small cleanup 2025-10-22 02:56:40 +03:00
IRainman
6c175c5a14 # format 2025-10-22 02:31:52 +03:00
IRainman
57f63fc327 * fix for parse_eight_digits_unrolled 2025-10-22 02:28:31 +03:00
IRainman
1dfd486df4 # cleanup 2025-10-22 01:51:13 +03:00
IRainman
397c0b8d26 # fix for FASTFLOAT_64BIT 2025-10-22 01:31:06 +03:00
IRainman
f396c23809 * Upgrade manually vectorized code to support SSE4.2, final cleanup and documentation for SSE2 code. 2025-10-22 01:13:25 +03:00
IRainman
f757eb45a2 * Upgrade manually vectorized code to support SSE4.2. 2025-10-22 00:44:29 +03:00
IRainman
58b5dc04c3 * Upgrade manually vectorized code to SSE4.2 for FASTFLOAT_64BIT because it's already used SSE4.1 instructions. 2025-10-22 00:27:36 +03:00
IRainman
1f0e2819e0 # type usage fix. 2025-10-21 22:40:41 +03:00
IRainman
eee068d3bc # types fix. 2025-10-21 22:19:04 +03:00
IRainman
336b97d027 # cleanup. 2025-10-21 22:01:22 +03:00
IRainman
487799ede2 # cleanup and speedup digit_comp. 2025-10-21 21:49:21 +03:00
IRainman
0e123c5e82 # fix for digit_comp. 2025-10-21 21:31:19 +03:00
IRainman
5a378ed87f # minimize diff in the crutch. 2025-10-21 21:14:58 +03:00
IRainman
fe0bce5eb7 # const and constexpr fixes
# types fixes.
# FASTFLOAT_ASSERT fix.
2025-10-21 21:08:08 +03:00
IRainman
1dc13a91f1 # improve checking for integer in the FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN mode. 2025-10-21 19:56:43 +03:00
IRainman
3288e56b34 # compilation fix after merge 2025-10-21 18:18:20 +03:00
IRainman
240d393bf6 # format 2025-10-21 16:25:35 +03:00
IRainman
72e75ed98f # compilation fix after merge. 2025-10-21 16:16:18 +03:00
IRainman
0f1a96a389 Merge branch 'main' of https://github.com/fastfloat/fast_float 2025-10-21 15:43:38 +03:00
Pavel Novikov
1ea4d2563e
made function non-template
+fixed a couple of typos
2025-09-30 12:18:29 +03:00
Daniel Lemire
7262d9454e lint 2025-09-29 15:08:24 -04:00
Daniel Lemire
fd98fd6689
specialize for std::float32_t and std::float64_t explicitly
credit: @lemire
2025-09-29 21:43:36 +03:00
Pavel Novikov
197c0ffca7
clang format 2025-09-29 21:43:35 +03:00
IRainman
fe376285c7 # types fix after merge from upstream. 2025-09-18 23:57:54 +03:00
IRainman
384fcec12d # clang format 2025-09-18 22:57:06 +03:00
IRainman
097800a609 # compilation fix after merge from upstream. 2025-09-18 22:41:24 +03:00
IRainman
af8ece24d7 Merge branch 'main' of https://github.com/fastfloat/fast_float 2025-09-18 22:10:37 +03:00
Pavel Novikov
13345cab65
added template overload for integer_times_pow10() 2025-09-18 21:29:25 +03:00
Daniel Lemire
88b1e5321c version 8.1.0 2025-09-18 09:38:45 -06:00
Daniel Lemire
2aa6d0ba72
Merge pull request #326 from fastfloat/patch803
Release candidate 8.0.3
2025-09-18 09:37:20 -06:00
Daniel Lemire
0b6d911220 format 2025-09-18 08:30:28 -06:00
Pavel Novikov
7a77227521
minor fix of forward declaration 2025-09-18 17:02:29 +03:00
Daniel Lemire
e20c952456
Merge pull request #320 from toughengineer/int_multiplication_by_power_of_10
Implemented multiplication of integer by a power of 10
2025-09-18 07:48:09 -06:00
Daniel Lemire
bb956b29db release candidate 8.0.3 2025-09-18 07:44:53 -06:00
Daniel Lemire
48fc5404d4 compatibility fix 2025-09-18 07:44:05 -06:00
IRainman
10970dbbae # cleanup 2025-09-17 00:52:26 +03:00
IRainman
e3aa99448a # fix for stackvec constructor. 2025-09-16 21:45:58 +03:00
IRainman
af1f8e3ac2 Merge branch 'main' of https://github.com/fastfloat/fast_float 2025-09-16 00:58:58 +03:00
InvalidUsernameException
9d81c71aef Do not mis-parse certain wide-character emojis as integer
When calling ch_to_digit() with a UTF-16 or UTF-32 code unit, it simply
truncates away any data stored in the non-low byte(s) of the code unit.
It then uses a lookup table to determine whether the low byte
corresponds to an ASCII digit. This is incorrect because as soon as any
bit outside the low byte is set, the number will never correspond to a
ASCII digit anymore.

To fix this, we produce a mask that is all zeroes if any bit outside the
low byte is set in the code unit, all ones otherwise. Anding this mask
with the original code unit forces the table lookup to return the
sentinel value from the zero-index if any high bit was set and causes
the code unit not to be parsed as integer.

This bug was discovered when loading Mastodon posts inside the Ladybird
browser where some of Mastodon's JavaScript would trigger the code path
that erroneously parsed the emoji as integer. It had the visible effect
that some digits inside the posts would get rendered as one of the
emojis that parsed to that digit. For more details see this issue:
https://github.com/LadybirdBrowser/ladybird/issues/6205

The emojis in the test case are simply all the emojis used on Mastodon
that caused the bug. They can be found here:
06803422da/app/javascript/mastodon/features/emoji/emoji_map.json
2025-09-15 23:12:28 +02:00
WenLei
6677924083 float_common.h: Support RISC-V 2025-09-11 11:11:30 +08:00
Pavel Novikov
0a230326ab
now finally got the anti-ambiguity overloads right, right? 2025-09-06 02:22:43 +03:00
Pavel Novikov
7ae62ee0d5
finally got the anti-ambiguity overloads right? 2025-09-06 02:10:55 +03:00
Pavel Novikov
e12463583f
added lacking overloads to avoid potential ambiguity 2025-09-06 00:12:41 +03:00
Pavel Novikov
20a7383442
renamed the function, cleaned up return type 2025-09-05 13:36:23 +03:00
Daniel Lemire
42db9ac1de
Merge branch 'main' into P2497R0 2025-09-03 12:04:36 -04:00
Pavel Novikov
6be07d66a8
inlining Clinger's fast path because why not,
and it seems to bring performance to the level before the changes somewhat
2025-09-03 16:59:40 +03:00
Daniel Lemire
c0582c27f5 typos in the comments 2025-09-02 17:29:12 -04:00
Pavel Novikov
a134561e4b
added missing inline specifiers 2025-09-02 23:03:38 +03:00
Pavel Novikov
7b8f04500a
implemented multiplication of integer by power of 10 2025-09-02 13:20:36 +03:00