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

Unecessary allocations in WeightedSnapshot Sorting #1338

Closed
CodingFabian opened this issue Sep 10, 2018 · 2 comments
Closed

Unecessary allocations in WeightedSnapshot Sorting #1338

CodingFabian opened this issue Sep 10, 2018 · 2 comments

Comments

@CodingFabian
Copy link

28db0b4
seems to have introduced unnecessary allocations of objects by using a Long object Comparator instead of a long primitive.

screen shot 2018-09-10 at 10 39 40

screen shot 2018-09-10 at 10 41 10

@CodingFabian
Copy link
Author

It still is a cood idea to reuse the comparator instance, but it shouldn't box the value

comparingLong() might also work

@arteam
Copy link
Member

arteam commented Dec 9, 2018

Fixed via #1354

@arteam arteam closed this as completed Dec 9, 2018
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

No branches or pull requests

2 participants