Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: You don't always have to use regexes

by spurperl (Priest)
on Feb 23, 2005 at 16:02 UTC ( [id://433731]=note: print w/replies, xml ) Need Help??


in reply to You don't always have to use regexes

It's quite interesting to time this and see just how much performance is gained. Additionally, I'm curious whether the regex engine has, or planned to have optimizations on "static" expressions like this ?

Additionally, usage of substr can save quite a few regular expressions here and there.

But the rule of thumb should be: use whatever seems more natural for the problem at hand, and optimize only if necessary.

  • Comment on Re: You don't always have to use regexes

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-23 23:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found