Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: move all 0s in an array to the beginning keeping other elements order same - Benchmarks

by davido (Cardinal)
on May 02, 2014 at 15:38 UTC ( [id://1084800]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
                    Rate kennethk_1 kennethk_2 kennethk_3 Cristoforo anilm
    +wr kcott davido Anonymous_Monk roboticus_2 dbuckhal GrandFather robot
    +icus_1 SuicideJunkie
    kennethk_1     260/s         --        -3%        -7%       -46%    -5
    +2%  -55%   -56%           -57%        -68%     -68%        -69%      
    +  -69%          -71%
    ...
    GrandFather    826/s       218%       209%       197%        71%     5
    +2%   44%    39%            38%          1%       0%          --      
    +   -0%           -6%
    roboticus_1    830/s       220%       211%       198%        72%     5
    +2%   45%    39%            38%          2%       1%          0%      
    +    --           -6%
    SuicideJunkie  882/s       240%       230%       217%        83%     6
    +2%   54%    48%            47%          8%       7%          7%      
    +    6%            --
    
  2. or download this
    use strict;
    use warnings;
    ...
            ( $_ ) ? push @y, $_ : unshift @y, $_;
        }
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2024-04-26 06:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found