September 2002
Intermediate to advanced
896 pages
21h 3m
English
Compact arrays are still basically just that—arrays to which compression and indexing have been applied. Like regular arrays, they are best suited to storing values that are all the same size. They also work best when the values being mapped to are relatively small; a big array of 32-byte values, for example, can become quite unwieldy.
But what if you're looking up a value that is large, or could be of variable length? A couple of techniques can be used.
If the total universe of values that can be mapped to is relatively small, you can save space without imposing too huge a performance penalty by offloading the target values into a separate array (or other data structure). The target values in the ...
Read now
Unlock full access