in reply to speeding up a hash lookup

Well, it depends a little on how many keys you have, but I have had good experiences with BerkeleyDB {1}. For 2k keys, I experienced a 40 times increase in speed (for the look-up, didn't test the insert) with the Berkeley BTree hash in comparison to perl's hash lookup.

Hope this helps,

Jeroen
"We are not alone"(FZ)
{1} I have plugged this one quite often the last few months, but it is really a great tool. You can read about my problems at the time here.