Re: removeheaders
Mike Tremaine <[email protected]>
| Newsgroups | gmane.comp.log.logwatch.devel |
|---|---|
| Message-ID | <[email protected]> |
Tom Metro wrote:
> Mike Cappella wrote:
>>>> The diff below corrects these issues. I've only tested it with data
>>>> that matches the first expression.
>>
>> I think the removeheaders optimization you posted can be further
>> reduced...
>
>
Exactly the kind of thing that needs to be proven. Good job.
.
.
.
>
> Jun 24 06:48:54 host service[2531]: [ID 1234 word.word] Solaris message
> Rate rh2 rh5 rh3 rh4 rh1
> rh2 165837/s -- -1% -3% -3% -7%
> rh5 168350/s 2% -- -2% -2% -6%
> rh3 171233/s 3% 2% -- -0% -4%
> rh4 171527/s 3% 2% 0% -- -4%
> rh1 178571/s 8% 6% 4% 4% --
>
>
> In all cases rh2 (reduced) actually ends up being the slowest.
>
> In the first two (supposedly most common) cases, the original is the
> second slowest.
Of course the sad part is the Solaris machines are generally going to be
the slowest now the optimizations makes them the losers :/. All those
old Ultrasparc II's are going to be kicking around for years [I know
because 4 of the hosts I support are on this vintage.]
> # consolidated + validation
> sub rh4 {
> $_ = shift;
>
> s/^\w\w\w \d\d \d\d:\d\d:\d\d [^ ]+ ([^\[:]+(\[\d+\])?: )?(\[ID \d+( \w+\.\w+)?] )?//o;
> return $_;
> }
>
This one is fine with me. [Other then the tears I shed for my little
Netra t1 105 440mhz + 1gb ;) ]
-Mike