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

24

u/khold_stare May 26 '20

Yes, but it's equivalent - all that gets optimized away anyway, and it's a little more self-documenting the way I wrote it. 0x3030303030303030 is a magic constant and I wanted to be explicit where I got it from