mirror of
https://github.com/fastfloat/fast_float.git
synced 2026-10-31 03:16:25 +08:00
Inline the parser into from_chars under clang
Clang kept from_chars_fixed_format out of line, so every conversion paid for the call and its six register saves and restores. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
18ee067179
commit
0900eedf2f
@ -187,7 +187,7 @@ template <> struct from_chars_caller<std::float64_t> {
|
||||
// whole parser into each caller, where the format is a constant; clang keeps
|
||||
// it out of line and would otherwise re-test each format flag per conversion.
|
||||
template <typename T, typename UC, chars_format Fmt>
|
||||
FASTFLOAT_CONSTEXPR20 from_chars_result_t<UC>
|
||||
fastfloat_clang_really_inline FASTFLOAT_CONSTEXPR20 from_chars_result_t<UC>
|
||||
from_chars_fixed_format(UC const *first, UC const *last, T &value) noexcept {
|
||||
return from_chars_caller<T>::call(first, last, value,
|
||||
parse_options_t<UC>(Fmt));
|
||||
@ -195,7 +195,7 @@ from_chars_fixed_format(UC const *first, UC const *last, T &value) noexcept {
|
||||
#endif
|
||||
|
||||
template <typename T, typename UC, typename>
|
||||
FASTFLOAT_CONSTEXPR20 from_chars_result_t<UC>
|
||||
fastfloat_clang_really_inline FASTFLOAT_CONSTEXPR20 from_chars_result_t<UC>
|
||||
from_chars(UC const *first, UC const *last, T &value,
|
||||
chars_format fmt /*= chars_format::general*/) noexcept {
|
||||
#ifdef __clang__
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user