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

Update Eq IntSet and Eq (IntMap a) #1028

Merged
merged 2 commits into from
Aug 17, 2024
Merged

Conversation

meooow25
Copy link
Contributor

  • Add benchmarks
  • Mark the function INLINABLE for IntMap. On benchmarks for IntMap Int this reduces the run time by ~22%.
  • Remove definitions for (/=). There is no good reason to implement this manually.

Related to #1016.


Benchmarks on GHC 9.6.3

IntMap before
  eq: OK
    39.0 μs ± 3.4 μs,   0 B  allocated,   0 B  copied,  10 MB peak memory
IntMap after
  eq: OK
    30.2 μs ± 3.0 μs,   0 B  allocated,   0 B  copied,  10 MB peak memory, 22% less than baseline

* Add benchmarks
* Mark the function INLINABLE for IntMap. On benchmarks for IntMap Int
  this reduces the run time by ~22%.
* Remove definitions for (/=). There is no good reason to implement this
  manually.
containers-tests/benchmarks/IntSet.hs Outdated Show resolved Hide resolved
@meooow25 meooow25 merged commit fbade40 into haskell:master Aug 17, 2024
11 checks passed
@meooow25 meooow25 deleted the intmap-intset-eq branch August 17, 2024 14:26
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