note demerphq <!-- <p><em></em></p> <code></code> <i></i>
<b></b> &#91; &#93; --> <p> Hi. </p> <p> Over the weekend I did
a little work on this. I loaded your million numbers into a
digit trie (a Patricia Trie restricted to the digits 0-9)
optimized for reduced memory consumption. The records loaded in
around 100 seconds on a 2.2 gighz machine (if temporary space is
not an issue this time drops dramatically), and ultimately
required less than 5MB to store. I calculated the ratio of bytes
used to store the data versus the sum of lengths of the keys and
it was 0.62, meaning that the data structure requires 0.62 bytes
to store one byte of key. Lookup time in the structure is
comparable (or better) than a raw hash (I will admit the
implementation of the lookup is done in Inline::C/XS). </p> <p>
Note that this Trie implementation may not be optimal. Because
it stores the keys as digits strings instead of byte encoding
the integer and then doing a byte-trie its probably less
efficient a trie implemented as the latt