On Apr 27, 2005, at 6:39 AM, Aaron Sherman wrote:

On Tue, 2005-04-26 at 10:48, Luke Palmer wrote:
Aaron Sherman writes:

The reasons I don't "use English" in P5:

* Variable access is slower

Hmm, looks to me like $INPUT_RECORD_SEPARATOR is faster. (Actually
they're the same: on each run a different one won, but just barely like
this).

Remember that I'm a Perl 3 programmer who has just gotten used to this "5" thing... ;-)

I sometimes lose track of the ugly hacks that have been rationalized
into workable practice over the versions. "use English" used to require
an extra level of indirection in the implementation, but clearly no
longer does. I don't have a perl older than 5.6.1 to test against, but
this was probably back in the 5.002 or 5.003 timeframe. I'm guessing.

It is also the fact that English.pm mentions $' and $` and that any mention
of those variables flips a global switch inside perl which causes *every*
regex with capturing parens to be slower.


See http://search.cpan.org/~nwclark/perl-5.8.6/pod/perlvar.pod#BUGS

Graham.



Reply via email to