One remark: the regex engine is fast, sub invocations are slow. To reduce the overhead of sub invocation, I'd replicate @x a few hundred or thousand times.
I was hoping that regex speed would improve, or at least be statistically similar, from release to release. In some of these cases, however, that does not seem to be the case. I then went and tried all the versions I have and got some widely varying numbers. Is this what others would expect?
As far as I remember, many changes to the regex engine improved its sanity with respect to Unicode strings - mostly their semantics, speed suffered a bit from time to time.
So it's not too surprising that some of them got slower.
In case of the "single" benchmark, it might be worth to clone the perl git repo, and use git bisect to find out which changeset it was that slowed it down that much - if it was a single one. Then tell p5p about your findings, maybe the performance loss can be tackled.
Perl 6 - links to (nearly) everything that is Perl 6.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.