-
Notifications
You must be signed in to change notification settings - Fork 44
NormalizedAc.concreteElements, InternalMap, InternalSet: use HashMap and HashSet #2543
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
Conversation
This comment has been minimized.
This comment has been minimized.
I noticed that some of the property tests were actually failing because the term contained symbolic elements which were reordered. Turns out I had modified part of Other issues are related to our builtin evaluation and tests: we use Would a good solution be to switch everything related to maps and sets to use Sort of related: do we still want to keep the symbolic elements and the opaque elements in lists? |
We decided to use the hashed versions instead everywhere in the builtin code. |
Edit: we discussed that this is not a problem in practice. The integration test below is failing, and I think it's because before we'd only pick the path where
with semantics:
Expected result is
|
This comment has been minimized.
This comment has been minimized.
HashMap k1 v -> | ||
HashMap k2 v | ||
mapKeys f = | ||
HashMap.fromList |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you confirm that no use of this function supplies an f
that is non-injective? Because if it did, we would risk losing entries from the hash map.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only ever use this function in places where we used to use Data.Map.Strict.mapKeys
, which has the same behavior you described.
Fixes #2508
Recent changes to the backend resulted in more frequent AC collection comparisons and this PR should fix the performance of that.
Review checklist
The author performs the actions on the checklist. The reviewer evaluates the work and checks the boxes as they are completed.