small perf improvement
This commit is contained in:
parent
9cce28fe38
commit
b415dc8325
@ -932,6 +932,8 @@ impl Entities {
|
|||||||
#[cold] // to help with branch prediction
|
#[cold] // to help with branch prediction
|
||||||
fn expand(meta: &mut Vec<EntityMeta>, len: usize) {
|
fn expand(meta: &mut Vec<EntityMeta>, len: usize) {
|
||||||
meta.resize(len, EntityMeta::EMPTY);
|
meta.resize(len, EntityMeta::EMPTY);
|
||||||
|
// Set these up too while we're here.
|
||||||
|
meta.resize(meta.capacity(), EntityMeta::EMPTY);
|
||||||
}
|
}
|
||||||
|
|
||||||
let index = row.index() as usize;
|
let index = row.index() as usize;
|
||||||
|
Loading…
Reference in New Issue
Block a user