mirror of
https://github.com/fastfloat/fast_float.git
synced 2026-02-07 18:26:45 +08:00
Enhance README with compiler optimization details
Updated performance recommendations and compiler flags for C++.
This commit is contained in:
parent
5652a168af
commit
3ae10eecae
@ -388,7 +388,10 @@ it's very likely because all parsers need to check the first character by itself
|
|||||||
macros `FASTFLOAT_ONLY_ROUNDS_TO_NEAREST_SUPPORTED` if you only need `FE_TONEAREST` rounding mode in the parsing; this option
|
macros `FASTFLOAT_ONLY_ROUNDS_TO_NEAREST_SUPPORTED` if you only need `FE_TONEAREST` rounding mode in the parsing; this option
|
||||||
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
|
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
|
||||||
supports all C++ standards since C++11. I also recommend using `string_view` everywhere if it's possible; it's available
|
supports all C++ standards since C++11. I also recommend using `string_view` everywhere if it's possible; it's available
|
||||||
since C++17, and if you want maximum performance, use the latest compiler with the latest C++ with O3 optimization and LTO!
|
since C++17, and if you want maximum performance, use the latest compiler with the latest C++ with maximum optimization:
|
||||||
|
```
|
||||||
|
-O3 -DNDEBUG + LTO
|
||||||
|
```
|
||||||
```C++
|
```C++
|
||||||
#define FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN
|
#define FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN
|
||||||
#define FASTFLOAT_ISNOT_CHECKED_BOUNDS
|
#define FASTFLOAT_ISNOT_CHECKED_BOUNDS
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user