Help for this page

Select Code to Download


  1. or download this
    # This data format is related to the original problem
    # read this as "17 copies of 43", "33 copies of 21", etc.
    ...
    print "\nAccessing random element:\n";
    cmpthese(-1, { made_by_map => sub { $a1[rand 100]; },
                   made_by_x   => sub { $a2[rand 100]; } });
    
  2. or download this
    Accessing element 0:
                     Rate   made_by_x made_by_map
    made_by_x   7554581/s          --        -11%
    ...
                     Rate made_by_map   made_by_x
    made_by_map 1724352/s          --         -2%
    made_by_x   1758653/s          2%          --
    
  3. or download this
    perl test.pl 100:100
    
  4. or download this
    perl test.pl `perl -e 'print join(q[:], (1) x 200)'`
    
  5. or download this
    --
    @/=map{[/./g]}qw/.h_nJ Xapou cets krht ele_ r_ra/;
    map{y/X_/\n /;print}map{pop@$_}@/for@/