mirror of
https://github.com/fastfloat/fast_float.git
synced 2026-01-01 03:12:18 +08:00
small performance improvement after full cleanup.
This commit is contained in:
parent
24231804ec
commit
051d15119e
@ -582,7 +582,7 @@ parse_int_string(UC const *p, UC const *pend, T &value,
|
||||
#if FASTFLOAT_HAS_IS_CONSTANT_EVALUATED && FASTFLOAT_HAS_BIT_CAST
|
||||
if (std::is_constant_evaluated()) {
|
||||
uint8_t str[4];
|
||||
for (uint_fast8_t j = 0; j < 4 && j < len; ++j) {
|
||||
for (uint_fast8_t j = 0; j != 4 && j != len; ++j) {
|
||||
str[j] = static_cast<uint8_t>(p[j]);
|
||||
}
|
||||
digits = bit_cast<uint32_t>(str);
|
||||
|
||||
@ -518,7 +518,7 @@ struct bigint : pow5_tables<> {
|
||||
limb_t const shl = n;
|
||||
limb_t const shr = limb_bits - shl;
|
||||
limb prev = 0;
|
||||
for (limb_t index = 0; index < vec.len(); ++index) {
|
||||
for (limb_t index = 0; index != vec.len(); ++index) {
|
||||
limb xi = vec[index];
|
||||
vec[index] = (xi << shl) | (prev >> shr);
|
||||
prev = xi;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user