Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

assigning the maximum of two numbers

by bageler (Hermit)
on Nov 02, 2005 at 22:45 UTC ( [id://505157]=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
                Rate    sort   sort2    loop ternary    List
    sort    112734/s      --     -1%    -39%    -48%    -67%
    ...
    loop    185579/s     65%     63%      --    -15%    -46%
    ternary 217375/s     93%     91%     17%      --    -37%
    List    344926/s    206%    203%     86%     59%      --
    
  2. or download this
    use List::Util qw(max);
    
    ...
        'List' => sub {assignmax3(@r)},
        'loop' => sub {assignmax4(@r)},
    };
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-23 16:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found