in reply to Premature and micro optimization...


Thanks for thwapping me with a cluebat, all.

Indeed, match_and_tr() was left out of what I posted here, as this was an attempt to appease my coworker, and I figured the OP was getting long enough. I copied and pasted precisely from my benchmark code, but ripped out the bits I thought I wasn't calling.

But hey, it helped immediately show you, gentle reader, that I wasn't testing what I thought I was testing, because I accidentally forgot to change "match_and_tr" to "old" when I was initially copying & pasting my benchmark setup code, way back when I first setup the benchmark.

s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)