]> git.lizzy.rs Git - rust.git/commitdiff
Mark round_up_to_next as inline
authorAriel Ben-Yehuda <arielb1@mail.tau.ac.il>
Sun, 9 Aug 2015 14:20:12 +0000 (17:20 +0300)
committerAriel Ben-Yehuda <arielb1@mail.tau.ac.il>
Sun, 9 Aug 2015 14:20:12 +0000 (17:20 +0300)
This speeds up rustc on #25916 from 1.36Â0.022s to 1.326Â0.025s

src/libstd/collections/hash/table.rs

index 349462aebe31b47f72b6cd6dd835ac1f068af8c8..e8ac8a132968f9fd312961777904c3a68c6abbad 100644 (file)
@@ -511,6 +511,7 @@ pub fn shift(mut self) -> Option<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)