in reply to (tye)Re: japhy regex analysis: case study (RE question...)
in thread RE question...yup, another one ;)
So on my machine, mod is much faster than chop; the unexplored substr approach is nearly as fast.timethese( -3, { mod => sub { $x % 10 }, chop => sub { chop(my $x = $x) }, substr => sub { substr($x, -1) }, }); __END__ (they ran for at least 3 seconds) chop: 8707.14/s (n= 29256) substr: 43620.45/s (n=136532) mod: 48906.87/s (n=163838)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re2: japhy regex analysis: case study (RE question...)
by tye (Sage) on May 28, 2001 at 07:53 UTC | |
|
Re: Re: (tye)Re: japhy regex analysis: case study (RE question...)
by snafu (Chaplain) on May 30, 2001 at 01:56 UTC |