File tree Expand file tree Collapse file tree 1 file changed +4
-27
lines changed Expand file tree Collapse file tree 1 file changed +4
-27
lines changed Original file line number Diff line number Diff line change @@ -50,35 +50,12 @@ use self::imp::Group;
50
50
51
51
// Branch prediction hint. This is currently only available on nightly but it
52
52
// consistently improves performance by 10-15%.
53
- // #[cfg(not(feature = "nightly"))]
54
- // use core::convert::identity as likely;
55
- // #[cfg(not(feature = "nightly"))]
56
- // use core::convert::identity as unlikely;
57
- #[ cfg( feature = "nightly" ) ]
58
- use core:: intrinsics:: { likely, unlikely} ;
59
-
60
53
#[ cfg( not( feature = "nightly" ) ) ]
61
- #[ inline]
62
- #[ cold]
63
- fn cold ( ) { }
64
-
65
- #[ cfg( not( feature = "nightly" ) ) ]
66
- #[ inline]
67
- fn likely ( b : bool ) -> bool {
68
- if !b {
69
- cold ( )
70
- }
71
- b
72
- }
54
+ use core:: convert:: identity as likely;
73
55
#[ cfg( not( feature = "nightly" ) ) ]
74
- #[ cold]
75
- #[ inline]
76
- fn unlikely ( b : bool ) -> bool {
77
- if b {
78
- cold ( )
79
- }
80
- b
81
- }
56
+ use core:: convert:: identity as unlikely;
57
+ #[ cfg( feature = "nightly" ) ]
58
+ use core:: intrinsics:: { likely, unlikely} ;
82
59
83
60
// Use strict provenance functions if available.
84
61
#[ cfg( feature = "nightly" ) ]
You can’t perform that action at this time.
0 commit comments