Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Re: Re: Code Smarter

by ichimunki (Priest)
on Jan 01, 2001 at 00:17 UTC ( #49121=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Code Smarter
in thread Code Smarter

Anyone know which of these is the faster expression (intuitively speaking, not looking for a benchmark)? Doesn't the RE have to do a lot of work to get to the end of each string passed, whereas substr simply clips? The only thing to remember is to either test .MP3 as well or do lc() on the substr().


Comment on Re: Re: Re: Code Smarter
Re: Re: Re: Re: Code Smarter
by I0 (Priest) on Jan 01, 2001 at 02:00 UTC
    My Benchmark shows the RE slightly faster.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2014-07-23 00:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (130 votes), past polls