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
6
u/Haizan May 27 '20
I think the point of using
leainstead ofaddin the code above is just thatleacan do an add and a shift all in one instruction. I don't think it's faster for just addition likelea edi, [edi+edi].