Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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

by Tux (Canon)
on Mar 25, 2011 at 15:34 UTC ( #895520=note: print w/replies, xml ) Need Help??


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

But now you're not playing fair :)

The diff is very much depending on what the first arg is, and how common is a first argument of a string of 1 Mb?

$a1 = "a" x 1e6"; Rate var und skp var 11049/s -- -100% -100% und 2812991/s 25360% -- -20% skp 3495253/s 31535% 24% -- $a1 = "a" x 1e4; Rate var und skp var 701455/s -- -75% -80% und 2840570/s 305% -- -17% skp 3440640/s 391% 21% -- $a1 = "a" x 100; Rate var und skp var 2055647/s -- -28% -43% und 2858267/s 39% -- -21% skp 3633679/s 77% 27% -- $a1 = "a"; Rate var und skp var 2075800/s -- -25% -41% und 2780315/s 34% -- -21% skp 3528861/s 70% 27% -- $a1 = 1; Rate var und skp var 2293760/s -- -14% -31% und 2672341/s 17% -- -20% skp 3340426/s 46% 25% -- $a1 = undef; Rate var und skp var 2429401/s -- -14% -30% und 2840570/s 17% -- -18% skp 3479788/s 43% 23% -- $a1 = sub { 1; }; Rate var und skp var 2383127/s -- -16% -32% und 2824827/s 19% -- -19% skp 3508785/s 47% 24% -- $a1 = bless { a1 => 1 }; Rate var und skp var 2383127/s -- -18% -31% und 2912710/s 22% -- -15% skp 3429921/s 44% 18% --

Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^5: Is undef list assignment a no-op?
by BrowserUk (Pope) on Mar 25, 2011 at 15:38 UTC
    But now you're not playing fair :)

    I was only doing what the op did. Except he used my $big = 'a' x 99999999;


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

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

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







    Results (96 votes). Check out past polls.

    Notices?