Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Regex anchor speed ?: Is /^.*X/ faster than /X/ ?

by extremely (Priest)
on Nov 09, 2000 at 16:34 UTC ( #40700=note: print w/ replies, xml ) Need Help??


in reply to Regex anchor speed ?: Is /^.*X/ faster than /X/ ?

I'd think about using:  &Frobnitz($_) if index $_, '@'; instead. I got this:
        Rate regexp  index
regexp 826/s     --   -10%
index  921/s    11%     --

with Benchmark. Why throw the regex engine at a single character when there is lovely little function just for that? =)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://40700]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2016-08-27 08:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (379 votes). Check out past polls.