Packing a string of digits into an integer quickly
Packing a string of digits into an integer quickly
lemire.me Packing a string of digits into an integer quickly
Suppose that I give you a short string of digits, containing possibly spaces or other characters (e.g., "20141103 012910"). We would like to pack the digits into an integer (e.g., 0x20141103012910) so that the lexicographical order over the string matches the ordering of the integers. We can use
There is a discussion on Hacker News, but feel free to comment here as well.
0 comments