-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Improve performance of LongObjectPagedHashMap#removeAndAdd and ObjectObjectPagedHashMap#removeAndAdd #114280
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
Conversation
…ObjectPagedHashMap#removeAndAdd
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
| private T set(long key, T value) { | ||
| if (value == null) { | ||
| throw new IllegalArgumentException("Null values are not supported"); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just assert it and don't waste time checking for it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, maybe make values a local again for extra fun :)
server/src/main/java/org/elasticsearch/common/util/LongObjectPagedHashMap.java
Show resolved
Hide resolved
|
@elasticmachine update branch |
|
@elasticmachine update branch |
💚 Backport successful
|
…ObjectPagedHashMap#removeAndAdd (elastic#114280)
…ObjectPagedHashMap#removeAndAdd (elastic#114280)
…ObjectPagedHashMap#removeAndAdd (elastic#114280)
Similarly to what we did in #114199, lets remove some unnecessary manipulation of the keys in the method removeAndAdd.