Skip to content

Commit

Permalink
Remove old code
Browse files Browse the repository at this point in the history
  • Loading branch information
a1phyr committed Nov 8, 2023
1 parent deaf7eb commit 83273fb
Showing 1 changed file with 4 additions and 27 deletions.
31 changes: 4 additions & 27 deletions src/raw/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,35 +50,12 @@ use self::imp::Group;

// Branch prediction hint. This is currently only available on nightly but it
// consistently improves performance by 10-15%.
// #[cfg(not(feature = "nightly"))]
// use core::convert::identity as likely;
// #[cfg(not(feature = "nightly"))]
// use core::convert::identity as unlikely;
#[cfg(feature = "nightly")]
use core::intrinsics::{likely, unlikely};

#[cfg(not(feature = "nightly"))]
#[inline]
#[cold]
fn cold() {}

#[cfg(not(feature = "nightly"))]
#[inline]
fn likely(b: bool) -> bool {
if !b {
cold()
}
b
}
use core::convert::identity as likely;
#[cfg(not(feature = "nightly"))]
#[cold]
#[inline]
fn unlikely(b: bool) -> bool {
if b {
cold()
}
b
}
use core::convert::identity as unlikely;
#[cfg(feature = "nightly")]
use core::intrinsics::{likely, unlikely};

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

0 comments on commit 83273fb

Please sign in to comment.