-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test strash key spread #18
Conversation
8a5008b
to
0bcfcb8
Compare
Cool, thanks! I became curious too and did something a bit similar (I counted collisions manually but only tried hashes directly on 2 32bit inputs). Certainly some of those give less collisions no? But the purpose of the hashing is speed/space optimisation, so I think a cheap hash is appropriate. BTW, there are some potentially interesting reads on non-hash ways of doing similar optimisations (If you are into that kind of thing...) |
this allows whitebox testing
0bcfcb8
to
d371b23
Compare
I tested the new hash with the benchmarks in this PR and it looks like the old one still comes out ahead? They're all close enough; we may be just testing our own hardware more than the hash at this point. Thanks for the links - I read through the FRAIGs paper this morning, but the others are new to me! |
I guess there is bias in the test and an exploit of a < b in the shift negate multiply, whereas the others don't care if a < b. The bias in the test is that the input sizes we are testing are small. If you are bit blasting arithmetic In a program they are much much larger. If you are doing model checking by unrolling of bit-blasting arithmetic, they get even bigger. I didn't make graphs but the microbenchmarks (on my Mac arm laptop) showed that multiplies hurt: the random 3cnf (100 x 300) would add about 10000 ns per multiply in the hash func for the 3cnf task. I am curious about whether defining strashCode as a var rather than a func decl has an effect on performance. I guess the compiler might identify that it never changes when no tests are run and it won't matter, but I am not sure, one would have to test without go -test to see. (BTW if interested in being a submitter into gini or other go-air repos, feel free to |
new version has logic.C performance improvements that should help see: - go-air/gini#17 - go-air/gini@3a1a4d9 - go-air/gini@8dd6805 - go-air/gini#18
new version has logic.C performance improvements that should help see: - go-air/gini#17 - go-air/gini@3a1a4d9 - go-air/gini@8dd6805 - go-air/gini#18
new version has logic.C performance improvements that should help see: - go-air/gini#17 - go-air/gini@3a1a4d9 - go-air/gini@8dd6805 - go-air/gini#18 Signed-off-by: Evan <cordell.evan@gmail.com>
new version has logic.C performance improvements that should help see: - go-air/gini#17 - go-air/gini@3a1a4d9 - go-air/gini@8dd6805 - go-air/gini#18 Signed-off-by: Evan <cordell.evan@gmail.com>
@ecordell Thanks much for the PR. Feel free to come back anytime for any reason -- I'm happy to see reference to gini in the operator-lifecycle-manager. (closing) |
new version has logic.C performance improvements that should help see: - go-air/gini#17 - go-air/gini@3a1a4d9 - go-air/gini@8dd6805 - go-air/gini#18 Signed-off-by: Evan <cordell.evan@gmail.com> Upstream-repository: operator-lifecycle-manager Upstream-commit: c20784d3e2a372c2a6a03dbcfedf512ca84b1eca
new version has logic.C performance improvements that should help see: - go-air/gini#17 - go-air/gini@3a1a4d9 - go-air/gini@8dd6805 - go-air/gini#18 Signed-off-by: Evan <cordell.evan@gmail.com> Upstream-repository: operator-lifecycle-manager Upstream-commit: c20784d3e2a372c2a6a03dbcfedf512ca84b1eca
new version has logic.C performance improvements that should help see: - go-air/gini#17 - go-air/gini@3a1a4d9 - go-air/gini@8dd6805 - go-air/gini#18 Signed-off-by: Evan <cordell.evan@gmail.com> Upstream-repository: operator-lifecycle-manager Upstream-commit: c20784d3e2a372c2a6a03dbcfedf512ca84b1eca
new version has logic.C performance improvements that should help see: - go-air/gini#17 - go-air/gini@3a1a4d9 - go-air/gini@8dd6805 - go-air/gini#18 Signed-off-by: Evan <cordell.evan@gmail.com> Upstream-repository: operator-lifecycle-manager Upstream-commit: c20784d3e2a372c2a6a03dbcfedf512ca84b1eca
new version has logic.C performance improvements that should help see: - go-air/gini#17 - go-air/gini@3a1a4d9 - go-air/gini@8dd6805 - go-air/gini#18 Signed-off-by: Evan <cordell.evan@gmail.com> Upstream-repository: operator-lifecycle-manager Upstream-commit: c20784d3e2a372c2a6a03dbcfedf512ca84b1eca
new version has logic.C performance improvements that should help see: - go-air/gini#17 - go-air/gini@3a1a4d9 - go-air/gini@8dd6805 - go-air/gini#18 Signed-off-by: Evan <cordell.evan@gmail.com> Upstream-repository: operator-lifecycle-manager Upstream-commit: c20784d3e2a372c2a6a03dbcfedf512ca84b1eca
new version has logic.C performance improvements that should help see: - go-air/gini#17 - go-air/gini@3a1a4d9 - go-air/gini@8dd6805 - go-air/gini#18 Signed-off-by: Evan <cordell.evan@gmail.com> Upstream-repository: operator-lifecycle-manager Upstream-commit: c20784d3e2a372c2a6a03dbcfedf512ca84b1eca
new version has logic.C performance improvements that should help see: - go-air/gini#17 - go-air/gini@3a1a4d9 - go-air/gini@8dd6805 - go-air/gini#18 Signed-off-by: Evan <cordell.evan@gmail.com> Upstream-repository: operator-lifecycle-manager Upstream-commit: c20784d3e2a372c2a6a03dbcfedf512ca84b1eca
new version has logic.C performance improvements that should help see: - go-air/gini#17 - go-air/gini@3a1a4d9 - go-air/gini@8dd6805 - go-air/gini#18 Signed-off-by: Evan <cordell.evan@gmail.com> Upstream-repository: operator-lifecycle-manager Upstream-commit: c20784d3e2a372c2a6a03dbcfedf512ca84b1eca
new version has logic.C performance improvements that should help see: - go-air/gini#17 - go-air/gini@3a1a4d9 - go-air/gini@8dd6805 - go-air/gini#18 Signed-off-by: Evan <cordell.evan@gmail.com> Upstream-repository: operator-lifecycle-manager Upstream-commit: c20784d3e2a372c2a6a03dbcfedf512ca84b1eca
new version has logic.C performance improvements that should help see: - go-air/gini#17 - go-air/gini@3a1a4d9 - go-air/gini@8dd6805 - go-air/gini#18 Signed-off-by: Evan <cordell.evan@gmail.com> Upstream-repository: operator-lifecycle-manager Upstream-commit: c20784d3e2a372c2a6a03dbcfedf512ca84b1eca
I was curious about
^a<<13 * b
as the strash calculation and played with some other options.It does seem to be the best option, so there's no reason to merge this. Just sharing the work.
This change is