diff options
| author | arielb1 <arielb1@mail.tau.ac.il> | 2015-08-13 22:23:26 +0300 |
|---|---|---|
| committer | arielb1 <arielb1@mail.tau.ac.il> | 2015-08-13 22:23:26 +0300 |
| commit | 21eae93550216ca02c7fa949268d5d2907d36e26 (patch) | |
| tree | cb8a805bdbbd3d3d34cdb49b6558b84217cd21e9 /src/libstd | |
| parent | 04badd6a973d2499731b49365a121dbc4c9c468e (diff) | |
| download | rust-21eae93550216ca02c7fa949268d5d2907d36e26.tar.gz rust-21eae93550216ca02c7fa949268d5d2907d36e26.zip | |
Mark round_up_to_next as inline
This speeds up rustc on #25916 from 1.36±0.022s to 1.326±0.025s Tests pass locally (even on 32-bit :-)
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/collections/hash/table.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libstd/collections/hash/table.rs b/src/libstd/collections/hash/table.rs index 349462aebe3..e8ac8a13296 100644 --- a/src/libstd/collections/hash/table.rs +++ b/src/libstd/collections/hash/table.rs @@ -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) |
