You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-13Lines changed: 16 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -378,33 +378,36 @@ int main() {
378
378
}
379
379
```
380
380
381
-
## You also can also use some additional options (currently only configure by macroses):
381
+
## You also can use some additional options to maximize performance and reduce size (made by HedgehogInTheCPP):
382
382
383
383
There is a really common use case in mathematical and other abstract syntax tree (AST)-like parsers that already processes
384
384
the sign and all other symbols before any number by itself. In this case you can use FastFloat to only parse positive numbers
385
385
in all supported formats with macros `FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN`, which significantly reduce the code size
386
-
and improve performance. An additional option for high performance and very fast processing is
387
-
`FASTFLOAT_TABLE_HACK_CHAR_DIGIT_LUT_DISABLED`; it reduces data size and speeds up parsing because a data cache is used for your
388
-
real data, not for a 256-byte table that flushes out at least 3 cache lines on x86. You also can use macros
389
-
`FASTFLOAT_ISNOT_CHECKED_BOUNDS` if your code already checks bounds; it's very likely because all parsers need to check the first
390
-
character by itself before parsing. Additionally, you can use macros `FASTFLOAT_ONLY_ROUNDS_TO_NEAREST_SUPPORTED`if you only need
391
-
`FE_TONEAREST` rounding mode in the parsing; this option also improves performance a bit and reduces code size.
386
+
and improve performance. You also can use macros `FASTFLOAT_ISNOT_CHECKED_BOUNDS` if your code already checks bounds;
387
+
it's very likely because all parsers need to check the first character by itself before parsing. Additionally, you can use
388
+
macros `FASTFLOAT_ONLY_ROUNDS_TO_NEAREST_SUPPORTED` if you only need `FE_TONEAREST` rounding mode in the parsing; this option
389
+
also improves performance a bit and reduces code size. In the high-performance example, I also use the [fmt library](https://github.com/fmtlib/fmt), which also
390
+
supports all C++ standards since C++11. I also recommend using `string_view` everywhere if it's possible; it's available
391
+
since C++17, and if you want maximum performance, use the latest compiler with the latest C++ with O3 optimization and LTO!
0 commit comments