Skip to content
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

Change IdxCache type to use Data.Parameterized.Map. #30

Merged
merged 1 commit into from
Apr 17, 2020
Merged

Conversation

brianhuffman
Copy link
Contributor

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)

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)
@brianhuffman brianhuffman requested a review from robdockins April 16, 2020 17:28
@brianhuffman
Copy link
Contributor Author

The change appears to be just as fast on the s2n/BIKE proofs as it was when Data.Parameterized.HashTable used the cuckoo hash table implementation. I don't expect it will cause any big slow-downs, but out of an abundance of caution, we should check how this affects performance on other benchmarks besides s2n/BIKE before we think about merging it.

In the longer term, it might be nice if parameterized-utils provided a special-purpose map type for Nonce keys that was more efficient than an ordinary Map.

Copy link
Contributor

@robdockins robdockins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty straightforward to me. I'm OK if CI is green.

Slight longer term, we might want to make a specific NonceMap type in parameterized utils so we can slot in an IntMap style datastructure later.

@kquick
Copy link
Member

kquick commented Apr 16, 2020

I'll post s2n and bike results here when they are available from fryingpan.

@kquick
Copy link
Member

kquick commented Apr 17, 2020

This passes for all the important tests and the performance is much better than even the original cuckoo hashtable implementation. Looks good to merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants