So it costs 3% more every ten million times it runs, the benefits of leaving it in are much more valuabel than 3%/10000000 :)
Actually, what happens is that importing those pragma cause flags to be set (eg $^H, see `perldoc perlvar`). Perl checks these flags during certain operations. If the flags are set then perl will do extra checking in the case of strict.pm and also emit warnings in the case of warnings.pm, so your benchmark doesn't really measure the cost. You'd have to benchmark on a project by project basis.
Good info :) I had the benchmark to support the statement above it about "There should be little if any noticeable speed difference".
And what you said is also why I stated exactly what code I'd run and had the qualifier:
"It may be different on your perl/OS/etc but that should give everyone a general idea, and if not then feel free to benchmark it on your OS/Perl"
Not that I'm trying persuade anyone against using them. As I said, I pretty much always use them. Any needed optimizations can usually be found elsewhere.
Right on
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>