-
Notifications
You must be signed in to change notification settings - Fork 63
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
Hashtable performance regression #674
Comments
cc @atomb |
I did some timing measurements on the bike_r2 proofs with the original Proving find_err1 with
Proving find_err1 with
(Profiling shows that the hash table operations went from about 1% of runtime with cuckoo up to more than 70% of total runtime with basic) I also tried switching out the definition of the
Yes, that's right: It's actually faster than the old cuckoo-based hash table. (Although, to be honest, the difference in the measurements is small enough that it's probably not significant.) If parameterized-utils provided an |
I don't quite see how to reconcile the profiling data that shows Cuckoo at 1% of the runtime and still has a greater than 1% speedup with |
The difference in the timings is probably due to thermal throttling; the actual runtime I expect is almost exactly the same. Another run with |
Wow, that's intense. I'm sort of amazed the basic hashtable performs so badly. Internally Nonces use |
We can fit nonces into an |
Isn't that platform-specific? If we can reliably make that coercion work, I'm happy. I guess we could just switch Nonce to use Int as well, but I like getting the compiler to promise we get as many bits as we want. |
Right, using It would be nice if someone would provide an explicitly 64-bit version of the |
This avoids a major performance regression with the hash table implementation now used by parameterized-utils in module `Data.Parameterized.HashTable`. (see GaloisInc/saw-script#674)
I have submitted a PR on the I looked at the profiling numbers more closely for the
A hundred-fold slowdown seems pretty extreme. Is this ratio considered reasonable for the algorithms in the |
That seems really bad. I wouldn't be very happy about that if I were maintaining |
I was just wondering if this is something worth reporting to the |
Especially given that the package documentation reads: Data.HashTable.ST.Basic contains a basic open-addressing hash table using linear probing as the collision strategy. On a pure speed basis it should currently be the fastest available Haskell hash table implementation for lookups, although it has a higher memory overhead than the other tables and can suffer from long delays when the table is resized because all of the elements in the table need to be rehashed. |
Resizing takes up about 10% of the total runtime for |
100x slowdown is clearly not "the fastest available Haskell hash table implementation for lookups". I'd say that's bug-worthy |
This goes along with the fix for #674.
From what I understand, this is fixed now. Am I right about that? |
Fixed by GaloisInc/what4#30 and #684. |
The change in GaloisInc/parameterized-utils#73 results in a performance regression that makes the BIKE proofs run several times slower. To reproduce, use 57d4a49 with GaloisInc/parameterized-utils@43cb6d2. Use BIKE R2 proofs from GaloisInc/s2n@caa6bea. A possible place to start would be the use of
IdxCache
in https://github.com/GaloisInc/crucible/blob/5c46b3ae77ddb2e95d2005f8cca675163a55fa1b/crucible-saw/src/Lang/Crucible/Backend/SAWCore.hs#L779.The text was updated successfully, but these errors were encountered: