in reply to RE: Re: THIS not THAT
in thread THIS not THAT

This would almost certainly be faster:
foreach (@diaglist) { next if /Clock/; next if /Switch/; next if /Power/; next if /Process +or/; push @something, $_; }
The constant-text-only regex means that Boyer-Moore can kick in sooner, or so says the hints I read about regex a while back.

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
RE: RE: RE: Re: THIS not THAT
by extremely (Priest) on Oct 04, 2000 at 01:41 UTC

    Survey says?

    Benchmark: timing 50000 iterations of Limo, merlyn...
          Limo: 17 wallclock secs (16.34 usr +  0.00 sys = 16.34 CPU) @ 3059.98/s (n
    =50000)
        merlyn:  2 wallclock secs ( 2.42 usr +  0.00 sys =  2.42 CPU) @ 20661.16/s (
    n=50000)

    Good instincts... =)

    --
    $you = new YOU;
    honk() if $you->love(perl)