[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Hash-table loading mechanism



I thougth about how to best store and retreive these hash-tables from
storage, and I realised that you (Christian) are totally rigth; storing the
exact structure of the hash-table isn't nessecary.

We will be doing extremely ligth computations to figure out the correct
structure of the hash-table from the hash-values of the entries. This migth
even be faster than reading it from disk, though I very much doubt that.

On top of that, storing hash-table structure on the disk makes it nessecary
to declare the hash-table size at the time the pak is compiled. This isn't
very smart, since then pak-readers can't decide on another structure without
losing the benefit of the stored structure, this making it totally
pointless. Other readers migth also choose other internal representations of
the entries than hash-tables.

We even save a little disk-space, though the gain is somewhat minimal.

Excuse me when sometimes I don't see the obvious :)