Skip to content

MINOR: Unnecessary changeCapacity in ImplicitLinkedHashCollection #17893

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

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

Copy link

This PR is being marked as stale since it has not had any activity in 90 days. If you
would like to keep this PR alive, please leave a comment asking for a review. If the PR has
merge conflicts, update it with the latest from the base branch.

If you are having difficulty finding a reviewer, please reach out on the [mailing list](https://kafka.apache.org/contact).

If this PR is no longer valid or desired, please feel free to close it. If no activity occurs in the next 30 days, it will be automatically closed.

@github-actions github-actions bot added the stale Stale PRs label Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant