From febdc3b201bcce1546c88e3be1b956d3f90d3059 Mon Sep 17 00:00:00 2001 From: Ariel Ben-Yehuda Date: Sun, 9 Aug 2015 17:20:12 +0300 Subject: Mark round_up_to_next as inline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This speeds up rustc on #25916 from 1.36Â0.022s to 1.326Â0.025s --- src/libstd/collections/hash/table.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/libstd') 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>> GapThenFull { /// # 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) -- cgit 1.4.1-3-g733a5