in reply to Matching lines in 2+ GB logfiles.
Just my first thought; so instead of
you could trywhile ( $window =~ m/\w{3}\s{1,2}\d{1,2}.*$re.*\n/oigc ) {
while ( $window =~ m/\w\w\w\s\s?\d\d?.*$re.*\n/iogc ) {
\w\w\w should run faster than \w{3}, same with \d\d? instead of \d{1,2}
Edit: and same with \s\s? vs. \s{1,2}. The direction should be clear.
Edit2: Maybe precompiling the regex with the qr// Operator might give another speedup.
By the way, I can't remember that /c Modifier, what is it for?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Matching lines in 2+ GB logfiles.
by CountZero (Bishop) on May 01, 2008 at 16:25 UTC |
In Section
Seekers of Perl Wisdom