It seems to have an effect to me...I also tried using a few other constructs...
timethese(-70, { and => 'my $m=0; for(@nums){if ($_ and $_>2) {$m++}}', or => 'my $f=0; for(@nums){if (($_||0)>2) {$f++}}', def => 'my $n=0; for(@nums){if (defined $_ and $_>2) {$n++}}', base => 'my $q=0; for(@nums){if ($_>2) {$q++}}' }); This produced: Benchmark: running and, base, def, or, each for at least 45 CPU second +s... and: 49 wallclock secs (47.71 usr + 0.05 sys = 47.76 CPU) @ 60 +77.60/s (n=290266) base: 44 wallclock secs (44.82 usr + 0.18 sys = 45.00 CPU) @ 62 +05.20/s (n=279234) def: 47 wallclock secs (44.96 usr + 0.04 sys = 45.00 CPU) @ 60 +34.82/s (n=271567) or: 45 wallclock secs (45.00 usr + 0.02 sys = 45.02 CPU) @ 60 +34.41/s (n=271669)
This produced the results I generally expected...barreling along without tests allows us to go slightly faster. If you test more things you get even slower. However suppressing undefined warnings is often not good because undef is sometimes a 'this call didn't work' value or it is an indication of lack of defaults. For example in parameters to a cgi script it is better if you need to explicitly specify what you want where nothing is specifed (forcing you to think about what you do want).

In reply to Re: To warn or not to warn, that is the question by repson
in thread To warn or not to warn, that is the question by Ovid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.