mirror of
https://github.com/fastfloat/fast_float.git
synced 2026-07-31 00:36:39 +08:00
Re-implements the optional digit-separator and base-prefix parsing (originally PR #369) on top of the current store_spans hot-path architecture, with the goal of zero overhead when the features are not used. Key changes vs. the original PR: - has_separator is now a *compile-time* template parameter on parse_number_string, dispatched once (from_chars_advanced -> parse_number_string_options) based on options.digit_separator. The has_separator==false instantiation that every default caller uses is byte-for-byte the separator-free parser: no separator comparison ever enters a digit loop and the SIMD eight-digit fast path is preserved. The separator-aware code lives only in the cold true instantiation. - The store_spans no-span hot path (added to main after the original PR was branched) is preserved. - parse_options_t fields are ordered so the two new single-byte fields (digit_separator, format_options) fall into the existing padding for UC == char. sizeof(parse_options_t<char>) stays 16 bytes, so the struct is still register-passed and the call boundary is unchanged. Result: for the default (no separator, no prefix) path, the generated assembly of from_chars<double> is identical to main, and benchmarks show no measurable regression (the original PR was 5-10% slower). Adds basictest coverage for digit separators (including the >19-digit overflow re-scan paths) and prefix skipping. |
||
|---|---|---|
| .. | ||
| bloat_analysis | ||
| build_tests | ||
| installation_tests | ||
| basictest.cpp | ||
| BUILD.bazel | ||
| CMakeLists.txt | ||
| example_comma_test.cpp | ||
| example_integer_times_pow10.cpp | ||
| example_test.cpp | ||
| exhaustive32_64.cpp | ||
| exhaustive32_midpoint.cpp | ||
| exhaustive32.cpp | ||
| fast_int.cpp | ||
| fixedwidthtest.cpp | ||
| fortran.cpp | ||
| ipv4_test.cpp | ||
| json_fmt.cpp | ||
| long_exhaustive32_64.cpp | ||
| long_exhaustive32.cpp | ||
| long_random64.cpp | ||
| long_test.cpp | ||
| p2497.cpp | ||
| powersoffive_hardround.cpp | ||
| random64.cpp | ||
| random_string.cpp | ||
| rcppfastfloat_test.cpp | ||
| short_random_string.cpp | ||
| string_test.cpp | ||
| supported_chars_test.cpp | ||
| wide_char_test.cpp | ||