diff --git a/include/fast_float/ascii_number.h b/include/fast_float/ascii_number.h index b45e47e..e431cbc 100644 --- a/include/fast_float/ascii_number.h +++ b/include/fast_float/ascii_number.h @@ -334,13 +334,12 @@ report_parse_error(UC const *p, parse_error error) { // store_spans is a *runtime* flag (not a template parameter, deliberately: a // template would create a second instantiation of this whole function and the // extra icache pressure wipes out the gain). When false, the integer/fraction -// spans (read only by the rare digit_comp slow path) are not materialized, which -// keeps the fat parsed_number_string_t off the hot path. The caller re-parses -// with store_spans=true if the slow path is actually reached. +// spans (read only by the rare digit_comp slow path) are not materialized, +// which keeps the fat parsed_number_string_t off the hot path. The caller +// re-parses with store_spans=true if the slow path is actually reached. template fastfloat_really_inline FASTFLOAT_CONSTEXPR20 parsed_number_string_t -parse_number_string(UC const *p, UC const *pend, - parse_options_t options, +parse_number_string(UC const *p, UC const *pend, parse_options_t options, bool store_spans = true) noexcept { chars_format const fmt = detail::adjust_for_feature_macros(options.format); UC const decimal_point = options.decimal_point; diff --git a/include/fast_float/parse_number.h b/include/fast_float/parse_number.h index d996002..be38781 100644 --- a/include/fast_float/parse_number.h +++ b/include/fast_float/parse_number.h @@ -294,8 +294,8 @@ from_chars_advanced(parsed_number_string_t &pns, T &value) noexcept { // noinline+cold so the force-inlined spans scanner is emitted ONCE off the hot // path rather than duplicated into from_chars_float_advanced (which bloated the // hot frame). from_chars_advanced already handles both the too_many_digits -// disambiguation and the am.power2<0 digit_comp recompute, so both slow branches -// collapse to one helper call. +// disambiguation and the am.power2<0 digit_comp recompute, so both slow +// branches collapse to one helper call. template fastfloat_noinline FASTFLOAT_CONSTEXPR20 from_chars_result_t parse_number_slow_path(UC const *first, UC const *last, T &value, @@ -331,8 +331,8 @@ from_chars_float_advanced(UC const *first, UC const *last, T &value, } bool const bjf = uint64_t(fmt & detail::basic_json_fmt) != 0; - // Fast path: parse WITHOUT materializing the integer/fraction spans (read only - // by the rare slow paths). Skipping their stores keeps the fat + // Fast path: parse WITHOUT materializing the integer/fraction spans (read + // only by the rare slow paths). Skipping their stores keeps the fat // parsed_number_string_t off the hot path. store_spans is a runtime argument, // so this reuses the single parse_number_string instantiation. parsed_number_string_t pns = @@ -366,8 +366,8 @@ from_chars_float_advanced(UC const *first, UC const *last, T &value, compute_float>(pns.exponent, pns.mantissa); // Slow path B (rare): Eisel-Lemire could not resolve; digit_comp needs the // integer/fraction spans. Route to the cold helper (clinger there is a - // dead-effect since it already failed here; the cold re-parse + digit_comp via - // from_chars_advanced reproduces this branch). + // dead-effect since it already failed here; the cold re-parse + digit_comp + // via from_chars_advanced reproduces this branch). if (am.power2 < 0) { return parse_number_slow_path(first, last, value, options, bjf); }