about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAriel Ben-Yehuda <arielb1@mail.tau.ac.il>2015-08-09 17:20:12 +0300
committerAriel Ben-Yehuda <arielb1@mail.tau.ac.il>2015-08-09 17:20:12 +0300
commitfebdc3b201bcce1546c88e3be1b956d3f90d3059 (patch)
tree128917af9d65a1366e4fff22ac49fd045e968d21
parenta5d33d8911d3ea691cb152bc582ee443ae3619da (diff)
downloadrust-febdc3b201bcce1546c88e3be1b956d3f90d3059.tar.gz
rust-febdc3b201bcce1546c88e3be1b956d3f90d3059.zip
Mark round_up_to_next as inline
This speeds up rustc on #25916 from 1.36Â0.022s to 1.326Â0.025s
-rw-r--r--src/libstd/collections/hash/table.rs1
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)