Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I wonder about "(OBJECT,FAKE)" and why "MOTHER_RE" is there, and so maybe with pre-compiled qr Perl has to follow this chain to top mother each time it tries to match.

>perl -MDevel::Peek -E "Dump qr/x/" SV = IV(0x2fda530) at 0x2fda540 REFCNT = 1 FLAGS = (TEMP,ROK) RV = 0x2fda588 SV = REGEXP(0x266a378) at 0x2fda588 REFCNT = 1 FLAGS = (OBJECT,FAKE) PV = 0x26d66a8 "(?^u:x)" CUR = 7 STASH = 0x2656a50 "Regexp" COMPFLAGS = 0x100 () EXTFLAGS = 0x680100 (CHECK_ALL,USE_INTUIT_NOML,USE_INTUIT_ML) ENGINE = 0x6e1a9ee0 (STANDARD) INTFLAGS = 0x0 () NPARENS = 0 LASTPAREN = 0 LASTCLOSEPAREN = 0 MINLEN = 1 MINLENRET = 1 GOFS = 0 PRE_PREFIX = 5 SUBLEN = 0 SUBOFFSET = 0 SUBCOFFSET = 0 SUBBEG = 0x0 MOTHER_RE = 0x26626f8 SV = REGEXP(0x267aff0) at 0x26626f8 REFCNT = 2 FLAGS = () PV = 0x26d66a8 "(?^u:x)" CUR = 7 COMPFLAGS = 0x100 () EXTFLAGS = 0x680100 (CHECK_ALL,USE_INTUIT_NOML,USE_INTUIT_ML) ENGINE = 0x6e1a9ee0 (STANDARD) INTFLAGS = 0x0 () NPARENS = 0 LASTPAREN = 0 LASTCLOSEPAREN = 0 MINLEN = 1 MINLENRET = 1 GOFS = 0 PRE_PREFIX = 5 SUBLEN = 0 SUBOFFSET = 0 SUBCOFFSET = 0 SUBBEG = 0x0 MOTHER_RE = 0x0 PAREN_NAMES = 0x0 SUBSTRS = 0x26b20b8 PPRIVATE = 0x26c16e8 OFFS = 0x26c3878 QR_ANONCV = 0x0 SAVED_COPY = 0x0 PAREN_NAMES = 0x0 SUBSTRS = 0x26b3238 PPRIVATE = 0x26c16e8 OFFS = 0x26c3ab8 QR_ANONCV = 0x0 SAVED_COPY = 0x0

p.s. BTW, to answer 1205970, $re is compiled once, either checking debug output, or "hoisting" first line of subroutine to top of the script, performance remains the same.


In reply to Re: Performance penalty of using qr// by vr
in thread Performance penalty of using qr// by Athanasius

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (2)
As of 2024-04-25 21:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found