Sheesh. It's not exactly a fair test though. The second hash population has all those calls to &randomstring and &hashval in it as well as the dodgy bucket bits....
I'll give it a play. Cheers!
Update:
Doh. But it does have the if (time() - $lasttime > 5) test in it.
I'm going to lay in the park and drink beer. Have fun.