Repository navigation
GenPMap: Fix hash collisions where keys hash to zero - #2310
Conversation
|
It's a very good idea to fix these hash functions that have annihilators. I haven't benchmarked this but I think we consistently should go with the
EDIT: |
|
Is it maybe worth to roll our own hash combination function here that inlines what ocaml does for it's in Ocaml code (which will hopefully not allocate)? Perhaps as a follow-up PR. |
|
ppx_deriving_hash already includes the
I'm not sure what you mean by that. ppx_deriving_hash currently doesn't have a way to configure the generated hash functions, but I should come up with a way. I've even thought about implementing the |
|
I used the proposed approach everywhere now. @sim642: If it looks good I'd like to merge in time for the weekly to see if it has any SV-COMP impact. |
Yeah, we could even thing of using the murmur3 package from OPAM. |
Closes #2307.
I think this may be worth having for SV-COMP, it can in principle improve results for everything that uses the
GenPMap.