diff --git a/container/src/columnation.rs b/container/src/columnation.rs index 97d3ecdd6..7f4ccf703 100644 --- a/container/src/columnation.rs +++ b/container/src/columnation.rs @@ -23,6 +23,7 @@ impl TimelyStack { /// /// Note that the associated region is not initialized to a specific capacity /// because we can't generally know how much space would be required. + #[inline(always)] pub fn with_capacity(capacity: usize) -> Self { Self { local: Vec::with_capacity(capacity), @@ -62,6 +63,7 @@ impl TimelyStack { /// Copies an element in to the region. /// /// The element can be read by indexing + #[inline] pub fn copy(&mut self, item: &T) { // TODO: Some types `T` should just be cloned. // E.g. types that are `Copy` or vecs of ZSTs. @@ -70,6 +72,7 @@ impl TimelyStack { } } /// Empties the collection. + #[inline] pub fn clear(&mut self) { unsafe { // Unsafety justified in that setting the length to zero exposes @@ -81,6 +84,7 @@ impl TimelyStack { /// Retain elements that pass a predicate, from a specified offset. /// /// This method may or may not reclaim memory in the inner region. + #[inline] pub fn retain_from bool>(&mut self, index: usize, mut predicate: P) { let mut write_position = index; for position in index..self.local.len() { @@ -102,6 +106,7 @@ impl TimelyStack { /// /// # Safety /// Elements within `local` can be reordered, but not mutated, removed and/or dropped. + #[inline(always)] pub unsafe fn local(&mut self) -> &mut [T] { &mut self.local[..] } diff --git a/timely/src/progress/frontier.rs b/timely/src/progress/frontier.rs index 53699dfb8..8a1b1be5a 100644 --- a/timely/src/progress/frontier.rs +++ b/timely/src/progress/frontier.rs @@ -495,6 +495,7 @@ impl MutableAntichain { /// This method is meant to be used for bulk updates to the frontier, and does more work than one might do /// for single updates, but is meant to be an efficient way to process multiple updates together. This is /// especially true when we want to apply very large numbers of updates. + #[inline] fn rebuild(&mut self) where T: Clone + PartialOrder + Ord,