Benchmark: timing 100000 iterations of foreach, hash... foreach: 14 secs (13.50 usr 0.00 sys = 13.50 cpu) hash: 6 secs ( 5.85 usr 0.00 sys = 5.85 cpu)