Remove DropNodeKey::kind.
It's not needed, because `next` and `local` fields uniquely identify the drop. This is a ~2% speed win on the very large program in #134404, and it's also a tiny bit simpler.
This commit is contained in:
@@ -230,7 +230,6 @@ struct DropNode {
|
|||||||
struct DropNodeKey {
|
struct DropNodeKey {
|
||||||
next: DropIdx,
|
next: DropIdx,
|
||||||
local: Local,
|
local: Local,
|
||||||
kind: DropKind,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Scope {
|
impl Scope {
|
||||||
@@ -291,7 +290,7 @@ impl DropTree {
|
|||||||
let drops = &mut self.drops;
|
let drops = &mut self.drops;
|
||||||
*self
|
*self
|
||||||
.existing_drops_map
|
.existing_drops_map
|
||||||
.entry(DropNodeKey { next, local: data.local, kind: data.kind })
|
.entry(DropNodeKey { next, local: data.local })
|
||||||
// Create a new node, and also add its index to the map.
|
// Create a new node, and also add its index to the map.
|
||||||
.or_insert_with(|| drops.push(DropNode { data, next }))
|
.or_insert_with(|| drops.push(DropNode { data, next }))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user