It doesn't look exactly like a no-op to me, but its close enough :)
#!/usr/bin/perl -- use strict; use warnings; use Benchmark 'cmpthese'; Main( @ARGV ); exit( 0 ); sub Main { #~ my $big = 'a' x 99999999; # out of memory for me :) my $big = 'a' x 9999999; cmpthese( -3, { 'U' => sub { Fundef($big,'bar'); return; }, 'R' => sub { Ffednu($big,'bar'); return; }, 'V' => sub { Fvaria($big,'bar'); return; }, }); } sub Fundef { my (undef, $x) = @_; my $blah = 0; if($x){ if($_[0]){ $bl +ah=1; } } return; } sub Ffednu { my ( $x ) = $_[1]; my $blah = 0; if($x){ if($_[0]){ $blah +=1; } } return; } sub Fvaria { my ($var, $x ) = $_[1]; my $blah = 0; if($x){ if($_[0]){ +$blah=1; } } return; } __END__
$ perl5.6.1.exe bench.895401.pl Benchmark: running R, U, V, each for at least 3 CPU seconds... R: 2 wallclock secs ( 3.09 usr + 0.00 sys = 3.09 CPU) @ 97 +7555.91/s (n=3024558) U: 4 wallclock secs ( 3.08 usr + 0.00 sys = 3.08 CPU) @ 95 +7410.66/s (n=2946910) V: 4 wallclock secs ( 3.20 usr + 0.00 sys = 3.20 CPU) @ 10 +76184.20/s (n=3447018) Rate U R V U 957411/s -- -2% -11% R 977556/s 2% -- -9% V 1076184/s 12% 10% -- $ perl5.6.1.exe bench.895401.pl Benchmark: running R, U, V, each for at least 3 CPU seconds... R: 4 wallclock secs ( 3.27 usr + 0.00 sys = 3.27 CPU) @ 97 +9082.06/s (n=3197682) U: 3 wallclock secs ( 3.02 usr + 0.00 sys = 3.02 CPU) @ 98 +8797.75/s (n=2982214) V: 4 wallclock secs ( 3.08 usr + 0.00 sys = 3.08 CPU) @ 10 +55320.66/s (n=3248277) Rate R U V R 979082/s -- -1% -7% U 988798/s 1% -- -6% V 1055321/s 8% 7% -- $ perl5.6.1.exe bench.895401.pl Benchmark: running R, U, V, each for at least 3 CPU seconds... R: 2 wallclock secs ( 3.19 usr + 0.00 sys = 3.19 CPU) @ 99 +5011.92/s (n=3172098) U: 2 wallclock secs ( 3.09 usr + 0.00 sys = 3.09 CPU) @ 95 +2459.60/s (n=2946910) V: 2 wallclock secs ( 3.02 usr + 0.00 sys = 3.02 CPU) @ 11 +42910.48/s (n=3447018) Rate U R V U 952460/s -- -4% -17% R 995012/s 4% -- -13% V 1142910/s 20% 15% -- ######################################################## ######################################################## $ perl5.12.2.exe bench.895401.pl Rate U R V U 773636/s -- -12% -18% R 883140/s 14% -- -6% V 941514/s 22% 7% -- $ perl5.12.2.exe bench.895401.pl Rate U R V U 791225/s -- -7% -16% R 846669/s 7% -- -10% V 939247/s 19% 11% -- $ perl5.12.2.exe bench.895401.pl Rate U R V U 785108/s -- -7% -17% R 843697/s 7% -- -11% V 944078/s 20% 12% --

In reply to Re: Is undef list assignment a no-op? by Anonymous Monk
in thread Is undef list assignment a no-op? by repellent

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.