5 @int_10 = rand_padded_ints( 10, 4, 8 ) ;
6 @int_100 = rand_padded_ints( 100, 4, 8 ) ;
12 #bench_sorts( 1 << 10, [qw(cmp)], [qw( int_10 int_100 )] ) ;
14 bench_sorts( 1 << 10, [qw(cmp default)], [qw( int_100 )] ) ;
20 my( $count, $sorts_ref, $data_names_ref ) = @_ ;
22 my( $sort, $data_name, $bench_text ) ;
25 $bench_text = <<BENCH ;
27 'null' => sub { null() },
30 foreach $sort ( 'null', @{$sorts_ref} ) {
32 foreach $data_name ( @{$data_names_ref} ) {
34 $bench_text .= <<BENCH ;
35 '$sort-$data_name' => sub { my( \@sorted ) = sort_$sort( \@$data_name ) },
40 $bench_text .= <<BENCH ;
66 sort { $a cmp $b } @_ ;
71 sort { $a <=> $b } @_ ;