[Templates] New text.replace virtual method for v2.15
Sergey Martynoff
sergey@martynoff.info
Fri, 3 Feb 2006 06:34:18 +0300
> I'm attaching a new test file you can run along with a file of
> benchmarks.
It was a good idea to benchmark the sub. At least it is obvious
now, that replacement without backreferences should be handles
separately, the simplest way. I ran the benchmark on my windows
pc, and get similar (even more contrast) results.
Totals:
Rate replace_andy
replace_andy 13224/s --
replace_andy_with_patch 20224/s 53%
replace_josh_new2 27434/s 107%
I don't think using no strict 'refs' is a big trouble (at least it
is used quite often in so many modules), so IMO josh_new2 may be a
good candidate.
--
Sergey Martynoff