in reply to Pattern matching speed
It looks to me like you've shifted the burden of your processing away from looking at each log file line more than once to looking at each comparison of each report more than once. I'm not surprised this is a lot slower; you've probably tripled the number of comparisons.
In particular, when you have an operation such as this one in a loop:
@comparisons = split(" ", $reports{$rep}[0]);you should ask yourself, "Self, why not just stick this information in the data structure as an array when I generate it?"
Without seeing where %reports comes from, I can't give you any more specific ideas. If you could classify each line with only one comparison, though, I bet you'd see a better speed gain.
|
|---|