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

comment on

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

Still occurs with Strawberry Perl 5.36.1 and 5.38.0 (see below) although I suspect it is more generic than Strawberry Perl.

Running the code through nytprof shows 1000001 calls to main::CORE:substcont at line 10 take most of the time.

It does not happen when the $x repetition is set to 1e5. There was a possibly related thread here a few months ago about character repetitions and COW but I can't locate it right now.

0.224835157394409 0.228233814239502 v5.22.3 9.92650699615479 0.662662982940674 v5.28.0 8.49285101890564 0.744230985641479 v5.36.1 8.02936911582947 0.788676977157593 v5.38.0

In reply to Re: Substitution unexpectedly very slow, in Strawberry by swl
in thread Substitution unexpectedly very slow, in Strawberry by Anonymous Monk

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.