in reply to Strange benchmark result that has me totally confounded
All your other REs end with \E (presumably to close the \Q) but those two do not, they end with just the letter E. You may be missing a \ in there.$post =~ s!\Q:-\\E!<img src="./emoticons/what.gif">!gio; $post =~ s!\Q:\\E!<img src="./emoticons/what.gif">!gio;
And benchmarking with the missing \ does show that the should_be_faster indeed is.
Array loaded with 84 posts. Begin benchmark. Rate should_be_slower should_be_faster should_be_slower 1331/s -- -14% should_be_faster 1552/s 17% --
|
|---|