Cache HashSet in try_to_allocate_bundle_to_reg (#90)

Keep `conflict_set` allocated in `Env` instead of allocating a new one
on every call. This improves register allocation performance by about
2%.
This commit is contained in:
Amanieu d'Antras
2022-09-27 00:14:43 +01:00
committed by GitHub
parent 67f5c167a8
commit 227a9fde91
3 changed files with 10 additions and 3 deletions

View File

@@ -87,6 +87,8 @@ impl<'a, F: Function> Env<'a, F> {
debug_annotations: std::collections::HashMap::new(),
annotations_enabled,
conflict_set: Default::default(),
}
}