in reply to how to speed lookups?
You are doing 64,425,800,000 assignments where should be doing 322,129.
should be$linecontainsbuf{$searchfield} = $line for @validbufs;
$linecontainsbuf{$searchfield} = $line;
Also, using split does more work than you need. Try replacing
with@fields=split /\'/,$line; $searchfield=$fields[1];
($searchfield) = $line =~ /^'([^']*)/;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: how to speed lookups?
by lukka (Novice) on Nov 11, 2008 at 21:36 UTC | |
Re^2: how to speed lookups?
by blazar (Canon) on Nov 12, 2008 at 19:04 UTC | |
by ikegami (Patriarch) on Nov 12, 2008 at 19:39 UTC |
In Section
Seekers of Perl Wisdom