oh.my.holy.pope -- sorry bishop ;-) yes it does!
test-6
file: 6_sample_file2
Size of document to string: 4354
Number of queried items: 1
---
96 item(s) tagged with both methods.
Unique item(s): a
---
Benchmark: timing 1000 iterations of Method One, Method Two...
Method One: 19 wallclock secs (18.96 usr + 0.00 sys = 18.96 CPU) @ 52.74/s (n=1000)
Method Two: 5 wallclock secs ( 5.01 usr + 0.00 sys = 5.01 CPU) @ 199.60/s (n=1000)
Rate Method One Method Two
Method One 52.7/s -- -74%
Method Two 200/s 278% --
All other tests also successfull. With iterations all timed over 5 wallclock seconds, better rates of method 2 are now: 287%, 300%, 435%. -- The longer it takes, the better the rates.
Finally, the test where every letter a is marked in the document:
a-test
Size of document to string: 65715
Number of queried items: 1
---
9103 item(s) tagged with both methods.
Unique item(s): a
---
Runtime method 1: 77 wallclock secs (77.06 usr + 0.12 sys = 77.18 CPU)
Runtime method 2: 0 wallclock secs ( 0.43 usr + 0.00 sys = 0.43 CPU)
An optimized version indeed. Thank you.
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.