Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/env perl
    
    ...
        my $last = '';
        my @unique = map { $last eq $_ ? () : ($last = $_) } @sorted;
    }
    
  2. or download this
                      Rate splice_unique  shift_unique    map_unique
    splice_unique  93699/s            --           -5%          -20%
    shift_unique   98642/s            5%            --          -16%
    map_unique    117028/s           25%           19%            --