Mark round_up_to_next as inline

This speeds up rustc on #25916 from 1.36Â0.022s to 1.326Â0.025s
This commit is contained in:
Ariel Ben-Yehuda 2015-08-09 17:20:12 +03:00
parent a5d33d8911
commit febdc3b201
1 changed files with 1 additions and 0 deletions

View File

@ -511,6 +511,7 @@ impl<K, V, M: Deref<Target=RawTable<K, V>>> GapThenFull<K, V, M> {
/// # Panics
///
/// Panics if `target_alignment` is not a power of two.
#[inline]
fn round_up_to_next(unrounded: usize, target_alignment: usize) -> usize {
assert!(target_alignment.is_power_of_two());
(unrounded + target_alignment - 1) & !(target_alignment - 1)