Skip to content

Commit 83273fb

Browse files
committed
Remove old code
1 parent deaf7eb commit 83273fb

File tree

1 file changed

+4
-27
lines changed

1 file changed

+4
-27
lines changed

src/raw/mod.rs

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -50,35 +50,12 @@ use self::imp::Group;
5050

5151
// Branch prediction hint. This is currently only available on nightly but it
5252
// 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-
6053
#[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;
7355
#[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};
8259

8360
// Use strict provenance functions if available.
8461
#[cfg(feature = "nightly")]

0 commit comments

Comments
 (0)