Skip to content

Commit

Permalink
Auto merge of #27822 - arielb1:inline-round-take-2, r=Gankro
Browse files Browse the repository at this point in the history
This speeds up rustc on #25916 from 1.36±0.022s to 1.326±0.025s

Tests pass locally (even on 32-bit :-)

r? @gankro
  • Loading branch information
bors committed Aug 14, 2015
2 parents e907fab + 21eae93 commit 0649b16
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libstd/collections/hash/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0649b16

Please sign in to comment.