On Sat, Jun 22, 2013 at 07:07:53AM -0700, Wallace Reis wrote: > The performance penalty introduced by English.pm for regular > expressions was fixed in 5.18, so update docs about it (without > needing to use "-no_match_vars" special flag) and pointing > to English.pm docs where necessary. Actually that's not strictly true. The full fix for $`,$&,$' performance issues involves the new COW mechanism, which was disabled by default in 5.18 (and enabled by default in 5.19.1). 5.18.0 has a partial fix, where it records the presence of the three vars separately. So in 5.18.0, this is fast: perl5180o -e'$&; $a="a"x1_000_000; 1 while $a =~ /a/g;' this is extremely slow: perl5180o -e'$`; $a="a"x1_000_000; 1 while $a =~ /a/g;' On 5.19.1, they're both fast. Even if had been fixed in 5.18.0, I think that the text in perlvars warning that in older versions the puncuation vars are slow, should be kept. -- "There's something wrong with our bloody ships today, Chatfield." -- Admiral Beatty at the Battle of Jutland, 31st May 1916.Thread Previous | Thread Next