Skip Navigation
TechNews @radiation.party irradiated @radiation.party
BOT

[HN] 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

Packing a string of digits into an integer quickly

[ comments | sourced from HackerNews ]

0
0 comments