I'm not sure how possible that is. You're saying have a sparse array with 64 bit keys, that presumably only stores the data present and not the sparsity (i.e. memory is not allocated for the missing elements). My arrays are in FORTRAN, which doesn't respond too well to arrays of unknown or unbounded size.

For 'items' I have two, equally size, arrays. The item array and the item_key array. Rather unsurprisingly, item_key, contains the key field, the item name. So we have:

Code:
item_key(n).name = the name of item n, this is the unique name, the hash key.
item_key(n).class = the class of item n
item_key(n).desc = the description of item n

and

item(n) = the data for item n
So the name is hashed into item_key to get index n, which is then used to store data in item at that index.

Once the database is loaded into the app, it only ever uses the index, and doesn't hash. Hashing is only done when creating new items. We used to store the database as a binary file which essentially just dumped the binary array data from memory (i.e. stored the prehashed indexes). However, for business and usability reasons, I'm converting the DB format to XML. This means that when loading a database I'll have to 'create' all my items, which means hashing, which means s..l..o..w..