File tree 5 files changed +73
-0
lines changed
5 files changed +73
-0
lines changed Original file line number Diff line number Diff line change
1
+ use core:: f128:: consts:: PI ;
2
+
3
+ use test:: { Bencher , black_box} ;
4
+
5
+ #[ bench]
6
+ fn div_euclid_small ( b : & mut Bencher ) {
7
+ b. iter ( || black_box ( 10000.12345f128 ) . div_euclid ( black_box ( PI ) ) ) ;
8
+ }
9
+
10
+ #[ bench]
11
+ fn div_euclid_medium ( b : & mut Bencher ) {
12
+ b. iter ( || black_box ( 1.123e30f128 ) . div_euclid ( black_box ( PI ) ) ) ;
13
+ }
14
+
15
+ #[ bench]
16
+ fn div_euclid_large ( b : & mut Bencher ) {
17
+ b. iter ( || black_box ( 1.123e4000f128 ) . div_euclid ( black_box ( PI ) ) ) ;
18
+ }
Original file line number Diff line number Diff line change
1
+ use core:: f16:: consts:: PI ;
2
+
3
+ use test:: { Bencher , black_box} ;
4
+
5
+ #[ bench]
6
+ fn div_euclid_small ( b : & mut Bencher ) {
7
+ b. iter ( || black_box ( 20.12f16 ) . div_euclid ( black_box ( PI ) ) ) ;
8
+ }
9
+
10
+ #[ bench]
11
+ fn div_euclid_large ( b : & mut Bencher ) {
12
+ b. iter ( || black_box ( 50000.0f16 ) . div_euclid ( black_box ( PI ) ) ) ;
13
+ }
Original file line number Diff line number Diff line change
1
+ use core:: f32:: consts:: PI ;
2
+
3
+ use test:: { Bencher , black_box} ;
4
+
5
+ #[ bench]
6
+ fn div_euclid_small ( b : & mut Bencher ) {
7
+ b. iter ( || black_box ( 130.12345f32 ) . div_euclid ( black_box ( PI ) ) ) ;
8
+ }
9
+
10
+ #[ bench]
11
+ fn div_euclid_medium ( b : & mut Bencher ) {
12
+ b. iter ( || black_box ( 1.123e7f32 ) . div_euclid ( black_box ( PI ) ) ) ;
13
+ }
14
+
15
+ #[ bench]
16
+ fn div_euclid_large ( b : & mut Bencher ) {
17
+ b. iter ( || black_box ( 1.123e32f32 ) . div_euclid ( black_box ( PI ) ) ) ;
18
+ }
Original file line number Diff line number Diff line change
1
+ use core:: f64:: consts:: PI ;
2
+
3
+ use test:: { Bencher , black_box} ;
4
+
5
+ #[ bench]
6
+ fn div_euclid_small ( b : & mut Bencher ) {
7
+ b. iter ( || black_box ( 1234.1234578f64 ) . div_euclid ( black_box ( PI ) ) ) ;
8
+ }
9
+
10
+ #[ bench]
11
+ fn div_euclid_medium ( b : & mut Bencher ) {
12
+ b. iter ( || black_box ( 1.123e15f64 ) . div_euclid ( black_box ( PI ) ) ) ;
13
+ }
14
+
15
+ #[ bench]
16
+ fn div_euclid_large ( b : & mut Bencher ) {
17
+ b. iter ( || black_box ( 1.123e300f64 ) . div_euclid ( black_box ( PI ) ) ) ;
18
+ }
Original file line number Diff line number Diff line change 1
1
// Disabling in Miri as these would take too long.
2
2
#![ cfg( not( miri) ) ]
3
3
#![ feature( test) ]
4
+ #![ feature( f16) ]
5
+ #![ feature( f128) ]
4
6
5
7
extern crate test;
6
8
9
+ mod f128;
10
+ mod f16;
11
+ mod f32;
12
+ mod f64;
7
13
mod hash;
You can’t perform that action at this time.
0 commit comments