mirror of
https://github.com/fastfloat/fast_float.git
synced 2026-09-14 14:42:26 +08:00
reduce data cache pressure.
This commit is contained in:
parent
42abbcbb34
commit
15ab8caa1f
@ -473,15 +473,16 @@ enum class parse_error : uint_fast8_t {
|
||||
};
|
||||
|
||||
template <typename UC> struct parsed_number_string_t {
|
||||
FASTFLOAT_NO_UNIQUE_ADDRESS UC const *lastmatch;
|
||||
FASTFLOAT_NO_UNIQUE_ADDRESS am_mant_t mantissa;
|
||||
FASTFLOAT_NO_UNIQUE_ADDRESS am_pow_t exponent;
|
||||
FASTFLOAT_NO_UNIQUE_ADDRESS UC const *lastmatch;
|
||||
|
||||
FASTFLOAT_NO_UNIQUE_ADDRESS parse_error error;
|
||||
#ifndef FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN
|
||||
FASTFLOAT_NO_UNIQUE_ADDRESS bool negative;
|
||||
#endif
|
||||
FASTFLOAT_NO_UNIQUE_ADDRESS bool invalid;
|
||||
FASTFLOAT_NO_UNIQUE_ADDRESS bool too_many_digits;
|
||||
FASTFLOAT_NO_UNIQUE_ADDRESS parse_error error;
|
||||
|
||||
// contains the range of the significant digits
|
||||
FASTFLOAT_NO_UNIQUE_ADDRESS span<UC const> integer; // non-nullable
|
||||
|
||||
@ -89,8 +89,8 @@ enum class chars_format : chars_format_t {
|
||||
};
|
||||
|
||||
template <typename UC> struct from_chars_result_t {
|
||||
UC const *ptr;
|
||||
std::errc ec;
|
||||
FASTFLOAT_NO_UNIQUE_ADDRESS UC const *ptr;
|
||||
FASTFLOAT_NO_UNIQUE_ADDRESS std::errc ec;
|
||||
|
||||
// https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2497r0.html
|
||||
constexpr explicit operator bool() const noexcept {
|
||||
@ -495,8 +495,8 @@ fastfloat_strncasecmp(UC const *actual_mixedcase, UC const *expected_lowercase,
|
||||
|
||||
// a pointer and a length to a contiguous block of memory
|
||||
template <typename T> struct span {
|
||||
T const *ptr;
|
||||
am_digits length;
|
||||
FASTFLOAT_NO_UNIQUE_ADDRESS T const *ptr;
|
||||
FASTFLOAT_NO_UNIQUE_ADDRESS am_digits length;
|
||||
|
||||
constexpr span(T const *_ptr, am_digits _length) noexcept
|
||||
: ptr(_ptr), length(_length) {}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user