YJIT: Initialize Vec with capacity for iterators (#8439)

This commit is contained in:
Takashi Kokubun 2023-09-14 10:55:00 -07:00 committed by GitHub
parent 9cb33aad55
commit fcc1699162
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: git 2023-09-14 17:55:19 +00:00
Merged-By: k0kubun <takashikkbn@gmail.com>

View file

@ -1568,7 +1568,7 @@ impl AssemblerDrainingIterator {
Self {
insns: asm.insns.into_iter().peekable(),
index: 0,
indices: Vec::default()
indices: Vec::with_capacity(ASSEMBLER_INSNS_CAPACITY),
}
}