[HN Gopher] Packing a string of digits into an integer quickly ___________________________________________________________________ Packing a string of digits into an integer quickly Author : mfiguiere Score : 37 points Date : 2023-07-08 20:46 UTC (2 hours ago) (HTM) web link (lemire.me) (TXT) w3m dump (lemire.me) | gumby wrote: | I don't understand how this can work: there are 15 (or 7 :-) | other characters with the same bottom four bits as each digit. | How does it distinguish between, say, '4' and 't'? Space and '0' | have the same lower four bits: \0! | jcparkyn wrote: | I think the author is only concerned with decimal digits (0-9). ___________________________________________________________________ (page generated 2023-07-08 23:00 UTC)