Help for this page

Select Code to Download


  1. or download this
    use strictures;
    use Benchmark "cmpthese";
    use List::Util "min"; # This is XS.
    ...
                       clever => sub {
                           $m = [ $_->[0], $_->[1] ]->[ $_->[0] <= $_->[1]
    + ] for @xy },
                      });
    
  2. or download this
                   Rate    clever   ternary list_util
    clever     347584/s        --      -56%      -68%
    ternary    792393/s      128%        --      -28%
    list_util 1096491/s      215%       38%        --