in reply to Efficiency of a Hash with 1 Million Entries
1) That's the beauty of a hash, a hash lookup will be the same speed, whether 10 or 1 million elements are in it
2) The hash is fast as long as you have enough real memory for it (i.e. don't have to swap out memory to disk).
A waste of time is calling friendoffriend.pl for each line. If you put that code inside the script you save a lot of cpu cycles spent on reserving memory, starting a new perl interpreter, reading the script, doing some inits and throwing all away after the friendoffriend.pl script stops thousands of times
|
|---|