use strict / perl -w

Michael G Schwern schwern at pobox.com
Thu Jan 31 18:22:48 CST 2002


On Thu, Jan 31, 2002 at 10:27:56PM +0000, Liyang Hu wrote:
> Evening,
> 
> Minor niggle I've got here: does using strict, or running with perl
> -w slow down the bytecode compilation at all? What about effects on
> the actual code performance?
> 
> (Someone here is trying to convince me it does. I said the effects
> were negligible, and if they really wanted speed they'd use mod_perl.)

The sort of people that worry about the startup costs of strict and -w
are also the sort of people who go hiking and clip the tags off
teabags to save weight. [1]  This is microptimization and people tend
to fixate on it rather than the real problem, like the cast-iron
skillet you're carrying.

No, there's no noticable difference. [2] In fact, I can't even
benchmark it properly because the time taken to load a module is so
small there's too much flutter.


[1] During the development of the U2 it was suggested that the pilots
take a pre-flight enema to save a pound or two of weight, but nobody
thought the pilots would like that idea.

[2] Unless you're Russian, named Ilya, working on Exporter.pm and
embedding perl in very small places.


-- 

Michael G. Schwern   <schwern at pobox.com>    http://www.pobox.com/~schwern/
Perl Quality Assurance	    <perl-qa at perl.org>	       Kwalitee Is Job One
my anus yearns now
warm paste fills me happily
saturday morning
	-- imploded



More information about the Belfast-pm mailing list