mirror of
https://github.com/Z3Prover/z3
synced 2026-06-05 16:40:52 +00:00
shave some overhead from fingerprint hash function #7281
This commit is contained in:
parent
7c30cbfe48
commit
51fcb10b2f
2 changed files with 27 additions and 9 deletions
|
|
@ -48,15 +48,9 @@ namespace smt {
|
|||
|
||||
class fingerprint_set {
|
||||
|
||||
struct fingerprint_khasher {
|
||||
unsigned operator()(fingerprint const * f) const { return f->get_data_hash(); }
|
||||
};
|
||||
struct fingerprint_chasher {
|
||||
unsigned operator()(fingerprint const * f, unsigned idx) const { return f->get_arg(idx)->hash(); }
|
||||
};
|
||||
struct fingerprint_hash_proc {
|
||||
unsigned operator()(fingerprint const * f) const {
|
||||
return get_composite_hash<fingerprint *, fingerprint_khasher, fingerprint_chasher>(const_cast<fingerprint*>(f), f->get_num_args());
|
||||
return f->get_data_hash();
|
||||
}
|
||||
};
|
||||
struct fingerprint_eq_proc { bool operator()(fingerprint const * f1, fingerprint const * f2) const; };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue