MCPcopy Index your code
hub / github.com/RustPython/RustPython / should_resize

Method should_resize

crates/vm/src/dict_inner.rs:245–251  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

243
244 #[inline]
245 const fn should_resize(&self) -> Option<usize> {
246 if self.filled * 3 > self.indices.len() * 2 {
247 Some(self.used * 2)
248 } else {
249 None
250 }
251 }
252
253 #[inline]
254 fn get_entry_checked(&self, idx: EntryIndex, index_index: IndexIndex) -> Option<&DictEntry<T>> {

Callers 1

unchecked_pushMethod · 0.80

Calls 2

SomeClass · 0.50
lenMethod · 0.45

Tested by

no test coverage detected