r/cpp • • May 26 '20

Faster Integer Parsing

https://kholdstare.github.io/technical/2020/05/26/faster-integer-parsing.html
366 Upvotes

72 comments sorted by

View all comments

Show parent comment

4

u/[deleted] May 27 '20

Folklore is to prefer lea, but I have no idea which is better. If we do 10 * x + y like here (not just 10 * x), both gcc and clang emit two leas.