"Alex V."<alex.v.odesk@gmail.com> schrieb am 24.04.2015 um 08:54 in Nachricht
<5539E88C.3080006@gmail.com>:
On 4/24/2015 9:02 AM, Ulrich Windl wrote:
I think this depends very much on your access patterns (which you didn't
explain).
Regards,
Ulrich
What required is `get(key)` and `set(key, val)`. And, optional but not
unwanted, range lookup.
Still unclear: What is the expected ratio between get and set for a specific key? Do you ever delete keys? If so, how many accesses do you expect before deleting a key?
You could hash your keys using MD5 or SHA, and use the first 16 bytes as key. As your access pattern does not include enumerating the original keys, that would work, saving space vs. consuming some extra CPU cycles. I can think of other algorithms, but you were not specific with your access pattern.
Regards,
Ulrich