Comment on Summing ASCII encoded integers on Haswell at almost the speed of memcpyparentComments−camel-cdr2yGiven that the input is "integers uniformly sampled from [0, 2³¹−1]" couldn't you use a LUT for the 99.99% case of just 10/9/8 digit numbers instead and have a cold branch the handle the very rare smaller numbers.−anonymoushn2yYes, maybe if one is clever and lucky this could cost only a popcnt and a branch? not sure.
Comments
Given that the input is "integers uniformly sampled from [0, 2³¹−1]" couldn't you use a LUT for the 99.99% case of just 10/9/8 digit numbers instead and have a cold branch the handle the very rare smaller numbers.
Yes, maybe if one is clever and lucky this could cost only a popcnt and a branch? not sure.