-
Notifications
You must be signed in to change notification settings - Fork 179
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
Use randomly structured Set and Map in benchmarks #1075
Conversation
This is motivated by #1069 (comment). |
Effect on benchmarks, GHC 9.10.1: Set Expand
Map Expand
Set operations, Set Expand
Set operations, Map Expand
Edit: I had repeated the Map benchmarks under Set, fixed now. |
56f8df1
to
032ab37
Compare
👍 The large change for |
032ab37
to
bb1b662
Compare
That's correct. To explain the large increases a little more,
Overall I don't see anything unusual, the changes in the numbers are reasonable. |
Trees constructed from [1..n] have a specific structure of perfect binary trees linked together. We shuffle the list so that the tree is generated from repeated insertions instead, which forms a random structure that should be more representative of average use cases. Most benchmarks show an increase in measured times, the amount varying from 10% to 70%. This is expected because the trees are more unbalanced now. A handful of benchmarks show larger increases. These were previously measuring best-case scenarios, which no longer occurs with random trees.
bb1b662
to
ea138a9
Compare
Trees constructed from [1..n] have a specific structure of perfect
binary trees linked together. We shuffle the list so that the tree
is generated from repeated insertions instead, which forms a random
structure that should be more representative of average use cases.
Most benchmarks show an increase in measured times, the amount varying
from 10% to 80%.