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

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

by Random_Walk (Prior)
on May 02, 2014 at 07:44 UTC ( [id://1084743]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    #
    ...
            ( $_ ) ? push @y, $_ : unshift @y, $_;
        }
    }
    
  2. or download this
                     Rate kennethk_2 kennethk_3 kennethk_1 anilmwr Anonymo
    +us_Monk kcott Cristoforo roboticus_1 SuicideJunkie dbuckhal Random_Wa
    +lk roboticus_2 GrandFather
    kennethk_2     1115/s         --        -7%       -11%    -39%        
    +   -40%  -47%       -58%        -60%          -60%     -61%        -6
    +2%        -62%        -63%
    ...
    dbuckhal       2882/s       159%       139%       130%     58%        
    +    56%   37%         9%          5%            3%       --         -
    +3%         -3%         -4%
    roboticus_2    2959/s       165%       146%       136%     62%        
    +    60%   41%        12%          7%            5%       3%          
    +0%          --         -1%
    GrandFather    2994/s       169%       149%       139%     64%        
    +    62%   43%        13%          9%            7%       4%          
    +1%          1%          --
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-25 06:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found