From fcc16991623653e72298b97ea0d5000ce6aa31c7 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Thu, 14 Sep 2023 10:55:00 -0700 Subject: [PATCH] YJIT: Initialize Vec with capacity for iterators (#8439) --- yjit/src/backend/ir.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yjit/src/backend/ir.rs b/yjit/src/backend/ir.rs index 5f69f5a01f..7477f375ac 100644 --- a/yjit/src/backend/ir.rs +++ b/yjit/src/backend/ir.rs @@ -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), } }