mirror of
https://github.com/fastfloat/fast_float.git
synced 2025-12-07 17:26:51 +08:00
Fix digit comparison, cleanup
This commit is contained in:
parent
cb397ef446
commit
a5632d5b57
@ -161,8 +161,8 @@ FASTFLOAT_SIMD_DISABLE_WARNINGS
|
||||
|
||||
// (x - '0') <= 9
|
||||
// http://0x80.pl/articles/simd-parsing-int-sequences.html
|
||||
const __m128i t0 = _mm_sub_epi16(data, _mm_set1_epi16(80));
|
||||
const __m128i t1 = _mm_cmpgt_epi16(t0, _mm_set1_epi16(-119));
|
||||
const __m128i t0 = _mm_add_epi16(data, _mm_set1_epi16(32720));
|
||||
const __m128i t1 = _mm_cmpgt_epi16(t0, _mm_set1_epi16(-32759));
|
||||
|
||||
if (_mm_movemask_epi8(t1) == 0) {
|
||||
i = i * 100000000 + parse_eight_digits_unrolled(simd_read8_to_u64(data));
|
||||
|
||||
@ -170,14 +170,6 @@ fastfloat_really_inline constexpr bool cpp20_and_in_constexpr() {
|
||||
#endif
|
||||
}
|
||||
|
||||
fastfloat_really_inline constexpr bool has_simd() {
|
||||
#if FASTFLOAT_HAS_SIMD
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Compares two ASCII strings in a case insensitive manner.
|
||||
template <typename UC>
|
||||
inline FASTFLOAT_CONSTEXPR14 bool
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user