[perl #76674] Locale::Maketext: speed and efficiency tweaks
authorTodd Rinaldo <toddr@cpan.org>
Tue, 28 Sep 2010 18:13:33 +0000 (11:13 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 28 Sep 2010 18:13:33 +0000 (11:13 -0700)
commit152eae845915a3a33260ad109ad3888c8894d666
tree478e87d2c30dcfdde03d3d3cc4eb48f4b1d1429d
parentcffb36981555111f364a511fb5763f65ea748c0e
[perl #76674] Locale::Maketext: speed and efficiency tweaks

Check string to compile for chars ~][ and return \"$string" if not found.
This is a 250% speed improvement on strings which don't require compile and only a
~2% hit if they did need compiling.

Remove \G since everything is being captured it has no value. This means we don't
have to worry about seting pos $string_to_compile = 0 to prevent the previous
regex from affecting this one. There is a negligible speed improvement removing
the \G
dist/Locale-Maketext/lib/Locale/Maketext.pm