@@ -7,8 +7,8 @@ const N2: usize = 448;
77const N3 : usize = 86 ;
88const N4 : usize = 41 ;
99
10- fn comb_for1 ( c : & mut Criterion ) {
11- c. bench_function ( "comb for1" , move |b| {
10+ fn tuple_comb_for1 ( c : & mut Criterion ) {
11+ c. bench_function ( "tuple comb for1" , move |b| {
1212 b. iter ( || {
1313 for i in 0 ..N1 {
1414 black_box ( i) ;
@@ -17,8 +17,8 @@ fn comb_for1(c: &mut Criterion) {
1717 } ) ;
1818}
1919
20- fn comb_for2 ( c : & mut Criterion ) {
21- c. bench_function ( "comb for2" , move |b| {
20+ fn tuple_comb_for2 ( c : & mut Criterion ) {
21+ c. bench_function ( "tuple comb for2" , move |b| {
2222 b. iter ( || {
2323 for i in 0 ..N2 {
2424 for j in ( i + 1 ) ..N2 {
@@ -29,8 +29,8 @@ fn comb_for2(c: &mut Criterion) {
2929 } ) ;
3030}
3131
32- fn comb_for3 ( c : & mut Criterion ) {
33- c. bench_function ( "comb for3" , move |b| {
32+ fn tuple_comb_for3 ( c : & mut Criterion ) {
33+ c. bench_function ( "tuple comb for3" , move |b| {
3434 b. iter ( || {
3535 for i in 0 ..N3 {
3636 for j in ( i + 1 ) ..N3 {
@@ -43,8 +43,8 @@ fn comb_for3(c: &mut Criterion) {
4343 } ) ;
4444}
4545
46- fn comb_for4 ( c : & mut Criterion ) {
47- c. bench_function ( "comb for4" , move |b| {
46+ fn tuple_comb_for4 ( c : & mut Criterion ) {
47+ c. bench_function ( "tuple comb for4" , move |b| {
4848 b. iter ( || {
4949 for i in 0 ..N4 {
5050 for j in ( i + 1 ) ..N4 {
@@ -59,8 +59,8 @@ fn comb_for4(c: &mut Criterion) {
5959 } ) ;
6060}
6161
62- fn comb_c1 ( c : & mut Criterion ) {
63- c. bench_function ( "comb c1" , move |b| {
62+ fn tuple_comb_c1 ( c : & mut Criterion ) {
63+ c. bench_function ( "tuple comb c1" , move |b| {
6464 b. iter ( || {
6565 for ( i, ) in ( 0 ..N1 ) . tuple_combinations ( ) {
6666 black_box ( i) ;
@@ -69,8 +69,8 @@ fn comb_c1(c: &mut Criterion) {
6969 } ) ;
7070}
7171
72- fn comb_c2 ( c : & mut Criterion ) {
73- c. bench_function ( "comb c2" , move |b| {
72+ fn tuple_comb_c2 ( c : & mut Criterion ) {
73+ c. bench_function ( "tuple comb c2" , move |b| {
7474 b. iter ( || {
7575 for ( i, j) in ( 0 ..N2 ) . tuple_combinations ( ) {
7676 black_box ( i + j) ;
@@ -79,8 +79,8 @@ fn comb_c2(c: &mut Criterion) {
7979 } ) ;
8080}
8181
82- fn comb_c3 ( c : & mut Criterion ) {
83- c. bench_function ( "comb c3" , move |b| {
82+ fn tuple_comb_c3 ( c : & mut Criterion ) {
83+ c. bench_function ( "tuple comb c3" , move |b| {
8484 b. iter ( || {
8585 for ( i, j, k) in ( 0 ..N3 ) . tuple_combinations ( ) {
8686 black_box ( i + j + k) ;
@@ -89,8 +89,8 @@ fn comb_c3(c: &mut Criterion) {
8989 } ) ;
9090}
9191
92- fn comb_c4 ( c : & mut Criterion ) {
93- c. bench_function ( "comb c4" , move |b| {
92+ fn tuple_comb_c4 ( c : & mut Criterion ) {
93+ c. bench_function ( "tuple comb c4" , move |b| {
9494 b. iter ( || {
9595 for ( i, j, k, l) in ( 0 ..N4 ) . tuple_combinations ( ) {
9696 black_box ( i + j + k + l) ;
@@ -101,13 +101,13 @@ fn comb_c4(c: &mut Criterion) {
101101
102102criterion_group ! (
103103 benches,
104- comb_for1 ,
105- comb_for2 ,
106- comb_for3 ,
107- comb_for4 ,
108- comb_c1 ,
109- comb_c2 ,
110- comb_c3 ,
111- comb_c4 ,
104+ tuple_comb_for1 ,
105+ tuple_comb_for2 ,
106+ tuple_comb_for3 ,
107+ tuple_comb_for4 ,
108+ tuple_comb_c1 ,
109+ tuple_comb_c2 ,
110+ tuple_comb_c3 ,
111+ tuple_comb_c4 ,
112112) ;
113113criterion_main ! ( benches) ;
0 commit comments