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

Use a map that is faster with integer keys #22

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

TrevorHansen
Copy link
Contributor

While I was working through the comments on my pull requests, I noticed that the greedy_dag uses the std hashmap which is slow with integer keys. This patch speeds it up by about 30%. Here is the comparison:

Loaded 512 jsons.
extractors: ['fx-greedy-dag', 'hashmap-greedy-dag']
cumulative time for fx-greedy-dag: 36099ms
cumulative time for hashmap-greedy-dag: 53058ms
fx-greedy-dag / hashmap-greedy-dag
geo mean
tree: 1.0000
dag: 1.0000
micros: 0.8621
quantiles
tree:   1.0000, 1.0000, 1.0000, 1.0000, 1.0000
dag:    1.0000, 1.0000, 1.0000, 1.0000, 1.0000
micros: 0.3409, 0.7740, 0.8178, 0.8729, 2.3235

@oflatt oflatt merged commit 361d935 into egraphs-good:main Dec 13, 2023
2 checks passed
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.

2 participants