in reply to Moving from hashing to tie-ing.

A 2.5 Gigabyte dataset usually cannot be kept in memory at once (unless you have an extra-ordinary amount of memory in your computer) , so whether you use a single hash or the Hash-of-Hashes you suggested, your OS is going to swap data to hard-disk all the time, severally hurting performance.

If you don't want to go the database-way yet, tie-ing is perhaps not so bad as it is really using a simple database behind the scenes. Much will depend on how large your key-space needs to be. If you cannot keep the keys in memory at once, performance will still suffer. How many records do you have in the file and how long is each pin?

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law