Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^5: Is undef list assignment a no-op?

by repellent (Priest)
on Mar 26, 2011 at 04:46 UTC ( #895637=note: print w/replies, xml ) Need Help??


in reply to Re^4: Is undef list assignment a no-op?
in thread Is undef list assignment a no-op?

Thanks for the benchmark! (Same thanks goes to Tux and BrowserUk).

Hmm. This is what I got. I changed to using subs instead:
use Benchmark qw(cmpthese); my $a1='a'x9999999; my $b1=12345; cmpthese -1,{ und=> sub { sub{ my( undef, $x) = @_ }->( $a1, $b1 ) }, skp=> sub { sub{ my $x = $_[1] }->( $a1, $b1 ) }, var=> sub { sub{ my( $unused, $x ) = @_;}->( $a1, $b1 ) }, }; __END__ Rate var und skp var 50.2/s -- -100% -100% und 516222/s 1027915% -- -32% skp 762291/s 1517942% 48% --

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://895637]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2021-10-28 18:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (96 votes). Check out past polls.

    Notices?