aboutsummaryrefslogtreecommitdiff
path: root/COPYING
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2022-04-18 17:22:55 -0400
committerPatrick Palka <ppalka@redhat.com>2022-04-18 17:22:55 -0400
commitd210653f3907ac1829fd275d067b2855ea53da24 (patch)
tree6e394b80ee6b02b74647c5a1a7220d4a2477c6d6 /COPYING
parent021b51814d67bedd8f41ac07edfd05654140c6e5 (diff)
downloadgcc-d210653f3907ac1829fd275d067b2855ea53da24.zip
gcc-d210653f3907ac1829fd275d067b2855ea53da24.tar.gz
gcc-d210653f3907ac1829fd275d067b2855ea53da24.tar.bz2
libstdc++: Micro-optimize __from_chars_pow2_base
In the first iteration of __from_chars_pow2_base's main loop, we need to remember the value of the leading significant digit for sake of the overflow check at the end (for base > 2). This patch manually unrolls this first iteration so as to not encumber the entire loop with logic that only the first iteration needs. This seems to significantly improve performance: Base Before After (seconds, lower is better) 2 9.36 9.37 8 3.66 2.93 16 2.93 1.91 32 2.39 2.24 libstdc++-v3/ChangeLog: * include/std/charconv (__from_chars_pow2_base): Manually unroll the first iteration of the main loop and simplify accordingly.
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions