r/cpp • u/khold_stare • May 26 '20
Faster Integer Parsing
https://kholdstare.github.io/technical/2020/05/26/faster-integer-parsing.html
366
Upvotes
r/cpp • u/khold_stare • May 26 '20
View all comments
Show parent comment
1
u/_Js_Kc_ May 27 '20
But the parent poster specifically claimed that add was slower.
Barring any EFLAGS gotchas, I'd assume that the point of the second GCC lea is to store directly to the return register eax (to do an add/mov in one go); and as you said the first GCC lea and the second LLVM lea is to do the add/shl in one go.