Found 4 bookmarks
Newest
Quickly identifying a sequence of digits in a string of characters
Quickly identifying a sequence of digits in a string of characters
Suppose that you want to quickly determine a sequence of eight characters are made of digits (e.g., ‘9434324134’). How fast can you go? In software, characters are mapped to integer values called the code points. The ASCII and UTF-8 code points for the digits 0, 1,…, 9 are the consecutive integers 0x30, 0x31, …, 0x39 … Continue reading Quickly identifying a sequence of digits in a string of characters
·lemire.me·
Quickly identifying a sequence of digits in a string of characters
How fast is bit packing?
How fast is bit packing?
Integer values are typically stored using 32 bits. Yet if you are given an array of integers between 0 and 131 072, you could store these numbers using as little as 17 bits each—a net saving of almost 50%. Programmers nearly never store integers in this manner despite the obvious compression benefits. Indeed, bit packing and … Continue reading How fast is bit packing?
·lemire.me·
How fast is bit packing?