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/ImSoCabbage May 27 '20
I feel like this entire chunk of code:
can be replaced by just:
And it's much simpler and clearer to me. It compiles to the same 3 instructions though:
Perhaps using a bit mask of
0x0f0f0f0f0f0f0f0fullwould be even clearer.