in reply to Re^2: multiple substitution
in thread multiple substitution
The pipes() and regexpa() functions used in the timing loops above both include generation of the matching regexes in each loop execution. I doubt it adds greatly to the overall execution time, but is it proper to include regex generation in the timing of a substitution operation?
On a more critical note, a substitution is done on the $s string in each repetition of each timing loop, but will there be anything to be found for substitution after the first pass of whatever timing function happens to be executed first? Are not all subsequent passes in all functions just comparing the time it takes for a regex to find no match in a string? (Maybe take the 8MB file content and x it into three identical 200 - 500MB strings and do just one comparison pass of substitutions on each string.)
|
|---|