in reply to Re: How do I measure my bottle ?
in thread How do I measure my bottle ?
One optimization I have seen used (though never profiled myself) is to tell perl how big a hash you will need:
Without this line, perl basically has to build a new hash table several times as the number of keys grows. (Think of it as the hash counterpart of pre-growing an array:my %hash; keys %hash = 100_000;
)my @array; $#array = 99_999;
As I said, I've only seen this while reading source code; I don't know how much it really gets you.
the lowliest monk
|
|---|