in reply to Re^5: LiBXML: New markup while preserving earlier tags?
in thread LiBXML: New markup while preserving earlier tags?
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.