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

Map/IntMap: Document the most common O(n²) performance mistake #961

Conversation

nh2
Copy link
Member

@nh2 nh2 commented Jul 10, 2023

This documents the single most common performance mistake when dealing with containers.

I have seen professional Haskellers, get it wrong or wonder about it countless times, and the only hint in the entire module space on how the function f :: a -> a -> a is applied is on the docs of insertWith, which is not where anybody looks when checking the docs of any of these functions.

@nh2 nh2 force-pushed the document-fromListWith-combination-function-performance branch from 2664751 to 6cf6aba Compare July 10, 2023 20:53
@nh2
Copy link
Member Author

nh2 commented Jul 21, 2023

Please have another look -- I would like to merge it before any merge conflicts arise.

@treeowl
Copy link
Contributor

treeowl commented Sep 27, 2023

Sorry this took so long. Thanks.

@treeowl treeowl merged commit 22f2247 into haskell:master Sep 27, 2023
9 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.

None yet

2 participants