perf: skip computing hash of bv_decide BVExpr.Cache.Key (#7709)
This PR skips computation of the hash of `BVExpr.Cache.Key` as the expression's hash is a computed field and the width is already mixed in by its hash function. This will probably only have a very minor effect but is visible in large SMTLIB benchmarks.
This commit is contained in:
parent
5fb990fcbd
commit
bb23713542
1 changed files with 5 additions and 1 deletions
|
|
@ -34,7 +34,11 @@ namespace BVExpr
|
|||
structure Cache.Key where
|
||||
w : Nat
|
||||
expr : BVExpr w
|
||||
deriving DecidableEq, Hashable
|
||||
deriving DecidableEq
|
||||
|
||||
instance : Hashable Cache.Key where
|
||||
-- The width is already mixed into the hash of `key.expr` which is completely cached.
|
||||
hash key := hash key.expr
|
||||
|
||||
structure Cache (aig : AIG BVBit) where
|
||||
map : Std.DHashMap Cache.Key (fun k => Vector (Nat × Bool) k.w)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue