http://www.perlmonks.org?node_id=986465


in reply to Matching simple patterns - is there a faster way?

mrguy123,

I benchmarked the code replacing the 'print' with '{ }':

Rate index regex regex 1562500/s -- -34% index 2380952/s 52% --
Your not testing print, are you?

What is funny, is that I ran the code 3 times, and the exact same result occurred all 3 times. I usually take the middle one!

"Well done is better than well said." - Benjamin Franklin