From 3ae10eecaec9853b8d07bea8f2585030651db320 Mon Sep 17 00:00:00 2001 From: HedgehogInTheCPP Date: Fri, 26 Dec 2025 21:36:32 +0300 Subject: [PATCH] Enhance README with compiler optimization details Updated performance recommendations and compiler flags for C++. --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 626b57a..d600225 100644 --- a/README.md +++ b/README.md @@ -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 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 -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++ #define FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN #define FASTFLOAT_ISNOT_CHECKED_BOUNDS