3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-22 16:45:31 +00:00

change parameter::hash so that the least significant bits arent overriden

the 3rd bit was being stuck by the parameter kind, leading to increased number of hash collisions
This commit is contained in:
Nuno Lopes 2021-05-27 09:38:21 +01:00
parent 322531e95c
commit 5a66dfad2a

View file

@ -102,7 +102,7 @@ unsigned parameter::hash() const {
case PARAM_ZSTRING: b = get_zstring().hash(); break;
case PARAM_EXTERNAL: b = get_ext_id(); break;
}
return (b << 2) | get_kind();
return b;
}
std::ostream& parameter::display(std::ostream& out) const {