455 Commits

Author SHA1 Message Date
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
IRainman
5ae2fba79d cleanup for parse_number_string 2025-05-10 19:59:22 +03:00
IRainman
437a80ccfd fix for type usage in parse_int_string 2025-05-08 18:19:45 +03:00
IRainman
978441a5bb additional FASTFLOAT_HAS_BIT_CAST improve for older standards. 2025-05-07 23:19:18 +03:00
IRainman
a550415314 additional fix for bfloat16_t. Sorry, I can't compile it's locally. 2025-05-07 22:55:48 +03:00
IRainman
7bac32408e fix for the parse_number_string 2025-05-07 22:14:55 +03:00
IRainman
f14d482767 fix for the parse_number_string 2025-05-07 21:59:53 +03:00
IRainman
88fff01513 fix for the parse_number_string 2025-05-07 21:51:43 +03:00
IRainman
3ee80c2da3 fix for the parse_number_string 2025-05-07 21:43:26 +03:00
IRainman
6b22957188 fix for the parse_number_string 2025-05-07 20:18:57 +03:00
IRainman
f7d5037a4f fix for the parse_number_string
small improvements for the FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN
2025-05-07 19:31:56 +03:00
IRainman
23a9c3f54d review of the parse_number_string function: now it's much faster, safer and easy to understand. 2025-05-07 18:02:44 +03:00
IRainman
4b94a612cf type usage fix 2025-05-07 00:44:20 +03:00
IRainman
2f8ff9a6eb compilation fix 2025-05-06 23:40:29 +03:00
IRainman
568dfef204 compilation fix 2025-05-06 23:21:59 +03:00
IRainman
036ba0d153 compilation fix 2025-05-06 23:03:56 +03:00
IRainman
1ec5f0880c compilation fix 2025-05-06 22:53:10 +03:00
IRainman
6f789de5d2 compilation fix. 2025-05-06 22:32:11 +03:00
IRainman
e446899538 compilation fix. 2025-05-06 22:19:50 +03:00
IRainman
a3ccc1f7b1 compilation fix 2025-05-06 22:05:06 +03:00
IRainman
a4c573e8ab compilation fix 2025-05-06 21:54:40 +03:00
IRainman
3f9e488979 format, fuck. 2025-05-06 21:09:33 +03:00
IRainman
e5f189754f compilation fixes. 2025-05-06 21:05:05 +03:00
IRainman
99d769db5b clang-format 2025-05-06 18:15:43 +03:00
IRainman
d5c05e51af additional type usage fixes and constexpr. 2025-05-06 17:44:31 +03:00
IRainman
afbb803aa4 compilation fixes for std::bfloat16_t and std::float16_t. Sorry for this, my compilers don't supports it.
additional type usage fixes and constexpr.
2025-05-06 16:53:30 +03:00
IRainman
a8c5bd9a38 warning fix. 2025-05-05 20:24:16 +03:00
IRainman
1febc3a070 Fix compilation for older standards 2025-05-05 20:19:46 +03:00
IRainman
0ba4e20bc4 lint 2025-05-05 19:49:53 +03:00
IRainman
5356317356 Fix compilation for older standards 2025-05-05 19:44:30 +03:00
IRainman
103f22056b Final functions call optimization. 2025-05-05 19:07:55 +03:00
IRainman
8721491941 Finally: after type refactoring is done give compiler opportunity to select best type for performance. 2025-05-05 18:42:32 +03:00
IRainman
c99930b2a0 added additional macro FASTFLOAT_ONLY_ROUNDS_TO_NEAREST_SUPPORTED for performance improve. 2025-04-30 00:56:02 +03:00
IRainman
17ffdffdd9 * additional types cleanup for speedup and reduce cache pressure. 2025-04-12 19:16:25 +03:00
IRainman
0a18d6b329 # format. 2025-04-12 17:17:04 +03:00
IRainman
ba1344c030 * carefully work with types in the library.
* fix for some types errors.
* fix small amount of not optimized code.
* add more comments to the code.
* unified of function binary_format::max_mantissa_fast_path() because it's do the same.
2025-04-12 17:06:38 +03:00
IRainman
69fbbff062 try additional part... 2025-04-12 00:47:18 +03:00
IRainman
b0bae17b10 * added chars_format_t for performance reason. 2025-04-11 23:49:27 +03:00
IRainman
f3db77a07c try reordering again. 2025-04-11 23:21:26 +03:00
IRainman
1aed8ee6dd try reordering again. 2025-04-11 23:10:26 +03:00
IRainman
0daee75dec # format 2025-04-11 22:56:15 +03:00
IRainman
563648f76d * fix errors in the parse_number_string. 2025-04-11 22:52:18 +03:00
IRainman
e71bfff4a3 additional improve for debug runtime. 2025-04-11 18:05:08 +03:00
IRainman
f8625b6416 fix warnings. 2025-04-10 18:45:05 +03:00
IRainman
8e1fda5d08 fixes and cleanup for the parse_number_string function.
exponent value is always less than in16_t.

original main:
Tests:
 time is: 44278ms.

size of my tests 389.0k
size of my program 164.0k

my main:
Tests:
 time is: 42015ms.

size of my tests 389.0k
size of my program 164.0k

my main with FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN
Tests:
 time is: 41282ms.

size of my tests 386.5k
size of my program 161.5k

After this I'll try it on my partner Linux machine with the original tests and compare much better.
2025-04-10 17:18:08 +03:00
IRainman
bbf4193339 cleanup code generation for parse_mantissa. 2025-04-09 21:44:30 +03:00
IRainman
c762936589 template interface cleanup for min_safe_u64 and max_digits_u64. 2025-04-09 15:55:54 +03:00
IRainman
d32ae04b1b reduce size of from_chars_result_t to 4 bytes. Cleanup for usage FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN. 2025-04-09 15:41:29 +03:00
IRainman
a081ebe6ce reduce size of from_chars_result_t to 4 bytes. Cleanup for usage FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN. 2025-04-09 15:27:55 +03:00
IRainman
f1b7f493aa after all sized checks is done I return the minimum registers size possible for the counter. Because the library only support 32 and 64 bit platform we only need 32 bit as a small counter. 2025-04-08 18:43:12 +03:00
IRainman
97bfec6ea3 style fix. 2025-04-08 15:01:25 +03:00
IRainman
27f02654fe style cleanup. 2025-04-08 04:06:30 +03:00
IRainman
5c610807de improvements of memory layout of parsed_number_string_t.
fix for FORTRAN parsing (needs to be merge to main)
improvement in the debug build.
code cleanup.
2025-04-08 04:04:26 +03:00
IRainman
b121f53316 reduce register pressure. 2025-04-08 03:55:12 +03:00
IRainman
a133b72fa8 FASTFLOAT_ASSUME 2025-04-08 03:24:11 +03:00
IRainman
b261492ae7 reduce register pressure. 2025-04-08 01:22:14 +03:00
IRainman
4f0615b4b4 Reduce register pressure and cleanup interface for standard. 2025-04-07 23:21:29 +03:00
IRainman
1651c2b0f8 Readded FASTFLOAT_CONSTEVAL, but not used currently. Cleanup for FASTFLOAT_ASSUME. 2025-04-07 23:10:38 +03:00
IRainman
ee620a029d reduce registers pressure. 2025-03-28 20:29:25 +03:00
IRainman
6aea2fb2e5 initialization cleanup. 2025-03-28 20:27:39 +03:00
IRainman
afb54a595e Disable FASTFLOAT_ASSUME by default. 2025-03-28 20:15:19 +03:00
IRainman
91e6c4d440 . 2025-03-28 19:39:10 +03:00
IRainman
ed871096ad Remove FASTFLOAT_CONSTEVAL20 that I was added before and cleanup diff. 2025-03-28 18:57:37 +03:00
IRainman
fc9f61efc9 Cleanup initialization of the adjusted_mantissa. 2025-03-28 18:55:57 +03:00
IRainman
8ebc89e1b5 Reduce registers pressure. 2025-03-28 18:31:01 +03:00
IRainman
1e3a135b8d reduce register pressure. 2025-03-24 11:45:33 +03:00
IRainman
c598a994e6 fix a warning. 2025-03-24 11:15:24 +03:00
IRainman
0188112c8f compilation fix in some old compilers. 2025-03-13 00:37:46 +03:00
IRainman
929e98182e lint 2025-03-12 21:13:20 +03:00
IRainman
2db26df2b8 Remove consexpr/consteval from code that probably assumed to run in the runtime and not be optimized (strange crutch actually). 2025-03-12 20:35:28 +03:00
IRainman
27c0cd581c lint 2025-03-12 20:23:05 +03:00
IRainman
f3c60527d5 more constexpr. 2025-03-12 20:15:29 +03:00
IRainman
3dd3712782 lint 2025-03-12 20:11:11 +03:00
IRainman
07ab87ca2b compilation fix in some cases. 2025-03-12 20:05:34 +03:00
IRainman
b869816c39 Merge branch 'main' of https://github.com/IRainman/fast_float into fastfloat-main 2025-03-12 19:04:01 +03:00
IRainman
e84f289337 FASTFLOAT_IF_CONSTEXPR17
fix compilation when FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN isn't enabled.
2025-03-12 18:45:48 +03:00
IRainman
1899647146 GCC compilation fix. 2025-03-12 17:56:01 +03:00
IRainman
3dd9a98926 more const 2025-03-12 17:44:08 +03:00
HedgehogInTheCPP
cfd0963705
Merge branch 'main' into main 2025-03-12 17:16:03 +03:00
IRainman
681346fde1 Merge branch 'main' of https://github.com/fastfloat/fast_float into fastfloat-main 2025-03-12 17:00:35 +03: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
IRainman
6c499fda5c FASTFLOAT_ASSUME review. 2025-03-10 05:34:45 +03:00
Daniel Lemire
b29208f93d adding FASTFLOAT_IF_CONSTEXPR17 2025-03-09 17:10:55 -04:00
IRainman
63eb578d52 Add FASTFLOAT_HAS_BYTESWAP check.
Improve FASTFLOAT_CONSTEVAL20 usage for older standards.
2025-03-09 22:55:04 +03:00
Daniel Lemire
6f0049a2e7 lint 2025-03-09 15:14:52 -04:00
Daniel Lemire
95dedd0aed turning json option into macro parameter 2025-03-09 15:13:43 -04:00
IRainman
354f4c3eac Compilation fix. 2025-03-09 21:09:51 +03:00
IRainman
c2daa8a614 Added FASTFLOAT_ASSUME for support attribute [[assume]] is declared in P1774 2025-03-09 03:41:27 +03:00
IRainman
f496321570 Completely remove deprecated macroses FASTFLOAT_ALLOWS_LEADING_PLUS and FASTFLOAT_SKIP_WHITE_SPACE, please use options.
Compilation fix when FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN isn't defined.
2025-03-09 02:37:46 +03:00
IRainman
ae29a0dbe5 PVS-Studio founds some errors, I fixed it. 2025-03-07 20:39:20 +03:00
IRainman
388426e35a fix type conversion warning. 2025-03-07 15:06:44 +03:00
IRainman
aba93f306f Additional compile time cleanup. When FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN is enabled we assume that we are in parser code with external loop that checks bounds.
Function cpp20_and_in_constexpr() now is really compile time evaluated. TODO fix warnings.
2025-03-07 14:51:20 +03:00
IRainman
bc3f331938 # cleanup. 2025-03-06 23:02:50 +03:00
IRainman
7a38e1bc75 fix for 32 bit build. completely done. All other parser mode also work fine. 2025-03-06 22:47:47 +03:00
IRainman
9ebac23081 Added a config option FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN for faster and more compact code parsing numbers with input support only positive C/C++ style numbers without nan or inf. That case is very useful in mathematical applications, game development, CSS parsing, embedded code, etc...
Additional improve in constant initialization.
2025-03-06 22:25:05 +03:00
IRainman
28795646ab more const 2025-03-06 19:43:47 +03:00
IRainman
63f6abebdf * Added an option disallow_leading_sign and stronger constexpr / consteval, also significantly reduce register pressure by reducing copy of constant data. 2025-03-06 18:29:16 +03:00
Joao Paulo Magalhaes
3e9dc96eb4 Fix -Wundef warnings seen in gcc 4.8 and 4.9 2025-02-13 08:45:11 +00:00