@@ -10,60 +10,58 @@ pub fn polynomial_benchmarks(c: &mut Criterion) {
10
10
let mut group = c. benchmark_group ( "Polynomial" ) ;
11
11
let order = const_random ! ( u64 ) % 8 ;
12
12
13
- group. bench_function ( "evaluate" , |bench| {
14
- let poly = rand_poly ( order) ;
15
- let x = FE :: new ( rand:: random :: < u64 > ( ) ) ;
16
- bench. iter ( || poly. evaluate ( black_box ( & x) ) ) ;
17
- } ) ;
13
+ // group.bench_function("evaluate", |bench| {
14
+ // let poly = rand_poly(order);
15
+ // let x = FE::new(rand::random::<u64>());
16
+ // bench.iter(|| poly.evaluate(black_box(&x)));
17
+ // });
18
18
19
- group. bench_function ( "evaluate_slice" , |bench| {
20
- let poly = rand_poly ( order) ;
21
- let inputs = rand_field_elements ( order) ;
22
- bench. iter ( || poly. evaluate_slice ( black_box ( & inputs) ) ) ;
23
- } ) ;
19
+ // group.bench_function("evaluate_slice", |bench| {
20
+ // let poly = rand_poly(order);
21
+ // let inputs = rand_field_elements(order);
22
+ // bench.iter(|| poly.evaluate_slice(black_box(&inputs)));
23
+ // });
24
24
25
- group. bench_function ( "add" , |bench| {
26
- let x_poly = rand_poly ( order) ;
27
- let y_poly = rand_poly ( order) ;
28
- bench. iter ( || black_box ( & x_poly) + black_box ( & y_poly) ) ;
29
- } ) ;
25
+ // group.bench_function("add", |bench| {
26
+ // let x_poly = rand_poly(order);
27
+ // let y_poly = rand_poly(order);
28
+ // bench.iter(|| black_box(&x_poly) + black_box(&y_poly));
29
+ // });
30
30
31
- group. bench_function ( "neg" , |bench| {
32
- let x_poly = rand_poly ( order) ;
33
- bench. iter ( || -black_box ( & x_poly) ) ;
34
- } ) ;
31
+ // group.bench_function("neg", |bench| {
32
+ // let x_poly = rand_poly(order);
33
+ // bench.iter(|| -black_box(&x_poly));
34
+ // });
35
35
36
- group. bench_function ( "sub" , |bench| {
37
- let x_poly = rand_poly ( order) ;
38
- let y_poly = rand_poly ( order) ;
39
- bench. iter ( || black_box ( & x_poly) - black_box ( & y_poly) ) ;
40
- } ) ;
36
+ // group.bench_function("sub", |bench| {
37
+ // let x_poly = rand_poly(order);
38
+ // let y_poly = rand_poly(order);
39
+ // bench.iter(|| black_box(&x_poly) - black_box(&y_poly));
40
+ // });
41
41
42
- group. bench_function ( "mul" , |bench| {
43
- let x_poly = rand_poly ( order) ;
44
- let y_poly = rand_poly ( order) ;
45
- bench. iter ( || black_box ( & x_poly) * black_box ( & y_poly) ) ;
46
- } ) ;
42
+ // group.bench_function("mul", |bench| {
43
+ // let x_poly = rand_poly(order);
44
+ // let y_poly = rand_poly(order);
45
+ // bench.iter(|| black_box(&x_poly) * black_box(&y_poly));
46
+ // });
47
47
48
48
let big_order = 9 ;
49
49
let x_poly = rand_complex_mersenne_poly ( big_order) ;
50
- let y_poly = rand_complex_mersenne_poly ( big_order) ;
51
- group. bench_function ( "fast_mul big poly" , |bench| {
52
- bench. iter ( || {
53
- black_box ( & x_poly)
54
- . fast_multiplication :: < Degree2ExtensionField > ( black_box ( & y_poly) )
55
- . unwrap ( )
56
- } ) ;
57
- } ) ;
58
- group. bench_function ( "slow mul big poly" , |bench| {
59
- bench. iter ( || black_box ( & x_poly) * black_box ( & y_poly) ) ;
60
- } ) ;
50
+ // let y_poly = rand_complex_mersenne_poly(big_order);
51
+ // group.bench_function("fast_mul big poly", |bench| {
52
+ // bench.iter(|| {
53
+ // black_box(&x_poly)
54
+ // .fast_fft_multiplication ::<Degree2ExtensionField>(black_box(&y_poly))
55
+ // .unwrap()
56
+ // });
57
+ // });
58
+ // group.bench_function("slow mul big poly", |bench| {
59
+ // bench.iter(|| black_box(&x_poly) * black_box(&y_poly));
60
+ // });
61
61
62
62
let y_poly = rand_complex_mersenne_poly ( big_order - 2 ) ;
63
63
64
64
group. bench_function ( "fast div big poly" , |bench| {
65
- let x_poly = rand_complex_mersenne_poly ( order as u32 ) ;
66
- let y_poly = rand_complex_mersenne_poly ( order as u32 ) ;
67
65
bench
68
66
. iter ( || black_box ( & x_poly) . fast_division :: < Degree2ExtensionField > ( black_box ( & y_poly) ) ) ;
69
67
} ) ;
0 commit comments