-
Notifications
You must be signed in to change notification settings - Fork 178
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
base: master
Are you sure you want to change the base?
Conversation
c34cf98
to
1b08c4b
Compare
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? |
I will be available to do it on Monday. Please ping me then if you remember. |
1b08c4b
to
dcc128a
Compare
Rebased and updated. @treeowl please take a look. |
dcc128a
to
a6da639
Compare
a6da639
to
cd76046
Compare
Add property tests and benchmarks for fromAscList and related functions for Set and Map.
d2acc7c
to
b4ea836
Compare
Why drop |
t = fromDistinctDescList (reverse nub_sort_xs) | ||
nub_sort_xs = List.map List.head $ List.groupBy ((==) `on` fst) $ List.sortBy (comparing fst) xs | ||
nubDownSortedKxs = | ||
List.map NE.head $ |
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.
I know you didn't do it, but map head q
is bletcherous. Why not [x | x : _ <- q]
instead?
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.
What's wrong with that? It's NonEmpty
's head
btw, not list.
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.
Ah... sorry ....
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. |
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:
Map: