358 Commits

Author SHA1 Message Date
Daniel Lemire
01ce95dfe4 v8.2.3 2026-02-03 11:27:40 -05:00
sleepingieght
4fa83ccff4 fix early return error in fastfloat_strncasecmp 2026-01-21 19:21:06 +05:30
Daniel Lemire
babb1f3335
Merge pull request #356 from sleepingeight/surya/opt-cmp
optimize fastfloat_strncasecmp
2026-01-18 18:56:05 -05: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
sleepingieght
4eb0d806fa add specialisations 2025-12-30 20:27:45 +05:30
sleepingieght
265cb849f3 optimise fastfloat_strncasecmp 2025-12-30 01:15:22 +05:30
Daniel Lemire
11ce67e5eb v8.2.1 2025-12-29 11:09:40 -05:00
Daniel Lemire
f4f9da1e6b fix for issue 354 2025-12-29 10:55:20 -05: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
Pavel Novikov
cb813a7765
fixed UB 2025-12-27 00:15:30 +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
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
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
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
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
Daniel Lemire
81b8306c5f implementation of https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2497r0.html 2025-05-19 18:08:36 -04:00
Daniel Lemire
50a80a73ab v8.0.2 2025-03-11 09:51:53 -04:00
Daniel Lemire
1bf7010153 v8.0.1 2025-03-10 09:04:05 -04:00
Daniel Lemire
c6732cd28b lint 2025-03-10 09:02:38 -04:00
Daniel Lemire
b29208f93d adding FASTFLOAT_IF_CONSTEXPR17 2025-03-09 17:10:55 -04:00