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

MINOR: Unnecessary changeCapacity in ImplicitLinkedHashCollection #17893

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

yunwan
Copy link

@yunwan yunwan commented Nov 21, 2024

  1. remove ImplicitLinkedHashCollection.add unnecessary changeCapacity
  2. remove ImplicitLinkedHashCollection.changeCapacity unnecessary iterator.remove

trunk

image
Benchmark                                                                (size)  Mode  Cnt       Score       Error  Units
ImplicitLinkedHashCollectionBenchmark.testCreateFromEmpty                 10000  avgt    6    4397.636 ±   326.099  us/op
ImplicitLinkedHashCollectionBenchmark.testCreateFromEmpty                100000  avgt    6  767246.324 ± 45883.873  us/op
ImplicitLinkedHashCollectionBenchmark.testCreateFromExpectedNumElements   10000  avgt    6     814.625 ±   421.052  us/op
ImplicitLinkedHashCollectionBenchmark.testCreateFromExpectedNumElements  100000  avgt    6   34003.380 ±  2006.759  us/op

this pr

Benchmark                                                                (size)  Mode  Cnt      Score      Error  Units
ImplicitLinkedHashCollectionBenchmark.testCreateFromEmpty                 10000  avgt    6    523.661 ±  251.641  us/op
ImplicitLinkedHashCollectionBenchmark.testCreateFromEmpty                100000  avgt    6  22689.922 ± 1312.356  us/op
ImplicitLinkedHashCollectionBenchmark.testCreateFromExpectedNumElements   10000  avgt    6    262.020 ±   24.802  us/op
ImplicitLinkedHashCollectionBenchmark.testCreateFromExpectedNumElements  100000  avgt    6   2306.306 ±  253.645  us/op

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant