Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 lurking in the Monastery: (4)
As of 2016-07-24 08:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (221 votes). Check out past polls.