Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

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.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2016-10-24 06:08 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (303 votes). Check out past polls.