mirror of
https://github.com/neondatabase/neon.git
synced 2026-10-16 16:53:02 +00:00
f optimize
This commit is contained in:
@@ -42,6 +42,10 @@ impl<K: Ord, V> VecMap<K, V> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn len(&self) -> usize {
|
||||
self.data.len()
|
||||
}
|
||||
|
||||
pub fn with_capacity(capacity: usize, ordering: VecMapOrdering) -> Self {
|
||||
Self {
|
||||
data: Vec::with_capacity(capacity),
|
||||
@@ -119,6 +123,11 @@ impl<K: Ord, V> VecMap<K, V> {
|
||||
Ok((None, delta_size))
|
||||
}
|
||||
|
||||
/// Where the key is known to be unique, and we don't want any instrumentation
|
||||
pub fn append2(&mut self, key: K, value: V) {
|
||||
self.data.push((key, value));
|
||||
}
|
||||
|
||||
/// Split the map into two.
|
||||
///
|
||||
/// The left map contains everything before `cutoff` (exclusive).
|
||||
|
||||
Reference in New Issue
Block a user