Re: Speed comparison of regex versus index, lc, and / /i



"A. Sinan Unur" <1usa@xxxxxxxxxxxxxxxxxxx> wrote in
news:Xns9AAEDDF8A85B8asu1cornelledu@xxxxxxxxx:

....

while ($text =~ /\Q$ss\E/g) {

Changing this to

while ( $text =~ /\Q$ss\E/og ) {

makes regex_find faster by about 1%.

Sinan


--
A. Sinan Unur <1usa@xxxxxxxxxxxxxxxxxxx>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
.