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

Tests and benchmarks for {Set,Map}.fromAscList and friends #962

Merged
merged 1 commit into from
Oct 26, 2024

Conversation

meooow25
Copy link
Contributor

@meooow25 meooow25 commented Jul 14, 2023

I wrote these up while working on making fromAscList fuse well. But I'm seeing some odd behavior there, so I thought I would split this straightforward PR out and work on the rest afterwards.

Current benchmarks on GHC 9.2.5
Set:

  fromAscList:  OK (0.21s)
    50.1 μs ± 2.7 μs, 240 KB allocated, 2.4 KB copied, 8.0 MB peak memory
  fromDescList: OK (0.21s)
    49.1 μs ± 4.1 μs, 240 KB allocated, 2.4 KB copied, 8.0 MB peak memory

Map:

  fromAscList:         OK
    39.6 μs ± 2.7 μs, 343 KB allocated, 5.2 KB copied,  10 MB peak memory
  fromAscListWithKey:  OK
    47.0 μs ± 4.3 μs, 455 KB allocated,  12 KB copied,  10 MB peak memory
  fromDescList:        OK
    39.6 μs ± 2.6 μs, 343 KB allocated, 5.5 KB copied,  10 MB peak memory
  fromDescListWithKey: OK
    48.1 μs ± 3.2 μs, 455 KB allocated,  13 KB copied,  10 MB peak memory

@meooow25
Copy link
Contributor Author

meooow25 commented Oct 7, 2023

I would like to pick this and related PRs back up and try to get it over the finish line. @treeowl, hope you are well. Would you be available to review these?

@treeowl
Copy link
Contributor

treeowl commented Oct 7, 2023

I will be available to do it on Monday. Please ping me then if you remember.

@meooow25 meooow25 force-pushed the fromAscList-test-bench branch from 1b08c4b to dcc128a Compare October 9, 2023 15:30
@meooow25
Copy link
Contributor Author

meooow25 commented Oct 9, 2023

Rebased and updated. @treeowl please take a look.

@meooow25 meooow25 force-pushed the fromAscList-test-bench branch from dcc128a to a6da639 Compare October 13, 2023 16:43
@meooow25 meooow25 requested a review from treeowl February 9, 2024 13:34
@meooow25 meooow25 force-pushed the fromAscList-test-bench branch from a6da639 to cd76046 Compare August 31, 2024 10:36
@meooow25 meooow25 force-pushed the fromAscList-test-bench branch from d2acc7c to b4ea836 Compare September 11, 2024 15:39
@treeowl
Copy link
Contributor

treeowl commented Sep 11, 2024

Why drop Magma? This whole PR slipped under my radar. I'll try to take a look shortly.

@meooow25
Copy link
Contributor Author

Why drop Magma?

Switched to arbitrary functions, makes things simpler.

It had also accumulated a bunch of edits, so I squashed a whole thing. You can take a fresh look.

Add property tests and benchmarks for fromAscList and related
functions for Set and Map.
@meooow25 meooow25 force-pushed the fromAscList-test-bench branch from b4ea836 to ac502dc Compare October 23, 2024 15:42
@meooow25
Copy link
Contributor Author

I'm planning to merge this soon so I can implement #963 (comment) which will use these.

@meooow25 meooow25 merged commit d2a508a into haskell:master Oct 26, 2024
12 checks passed
@meooow25 meooow25 deleted the fromAscList-test-bench branch October 26, 2024 07:48
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