Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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

by repellent (Priest)
on Mar 26, 2011 at 04:46 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2024-04-25 20:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found