Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Bench this BBcode Part 2

by JavaFan (Canon)
on Oct 04, 2010 at 10:58 UTC ( #863313=note: print w/ replies, xml ) Need Help??


in reply to Re: Bench this BBcode Part 2
in thread Bench this BBcode Part 2

Perhaps you should compile this once with the qr operator instead of every time you use it?
No, he shouldn't. That *slows* down the program (although probably not measurable). I see $long_regex only be used twice, and in both cases it's interpolated. There's no point in making the compile-stringify round trip, if all you're needing is the string form. (On top of that, after the roundtrip, the resulting string is larger).

Using qr to avoid additional compilation only makes sense if you don't interpolate, and use it in different places.


Comment on Re^2: Bench this BBcode Part 2

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2014-07-23 03:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (131 votes), past polls