Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-19 18:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found