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

Adjust strictness of from{Asc,Desc}List* for maps #1023

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

meooow25
Copy link
Contributor

@meooow25 meooow25 commented Aug 11, 2024

Make the functions strict in the first value of the run of equal keys. This makes the strictness match that of the fromList functions.

Fixes #473.

No impact on benchmarks, on GHC 9.6.3

Map:
  fromAscList: OK
    65.2 μs ± 5.4 μs, 686 KB allocated,  21 KB copied, 9.0 MB peak memory,       same as baseline

IntMap:
  fromAscList: OK
    46.3 μs ± 2.7 μs, 223 KB allocated, 6.1 KB copied,  10 MB peak memory,       same as baseline

@meooow25 meooow25 force-pushed the fromAscList-strictness branch from 60e57c2 to 5c15647 Compare August 11, 2024 18:41
Make the functions strict in the first value of the run of equal keys.
This makes the strictness match that of the fromList functions.
@meooow25 meooow25 force-pushed the fromAscList-strictness branch from 5c15647 to e0542e8 Compare August 15, 2024 06:41
@meooow25 meooow25 merged commit fb2aa39 into haskell:master Aug 15, 2024
11 checks passed
@meooow25 meooow25 deleted the fromAscList-strictness branch August 15, 2024 07:54
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.

Settle on a consistent strictness for fromList and fromAscList
1 participant