Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: About List::Util's pure Perl shuffle()

by blazar (Canon)
on Jul 11, 2007 at 23:13 UTC ( [id://626103]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub bzr (@) {
        my @a = @_;
    ...
        my $i = @_;
        map +($n=randi($i--), $a[$n], $a[$n]=$a[$i])[1], @_;
    }
    
  2. or download this
          Rate  run  buk
    run 7467/s   -- -12%
    buk 8454/s  13%   --
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-19 21:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found