The task that started me on the quest for speed was indeed a monster regex, it was also being called many times in a tight loop. As the regex was essentially repetitious, I originally thought that compiling the base regex with qr// and then using that in conjuction with a repeat count and the none repeating elements also compliled with /o might leach some benefits, but the reverse was true. I settled for programically generating the regex (using x n) into a single large regex and then compiling it with qr// (which appeared to give some slight performance benefit over /o). This was possibly due to the fact that when compiled with qr//, you can use the resultant variable directly ($string =~ $compiled_re) rather than needing to embed it within an m// operator (m/$compiled_re/). Maybe its slightly quicker to execute the former than the latter? The difference seemed significant enough to make it worthwhile..
Okay you lot, get your wings on the left, halos on the right. It's one size fits all, and "No!", you can't have a different color.
Pick up your cloud down the end and "Yes" if you get allocated a grey one they are a bit damp under foot, but someone has to get them.
Get used to the wings fast cos its an 8 hour day...unless the Govenor calls for a cyclone or hurricane, in which case 16 hour shifts are mandatory.
Just be grateful that you arrived just as the tornado season finished. Them buggers are real work.
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:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||