-
Notifications
You must be signed in to change notification settings - Fork 25k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite CollectionUtils dedup to work with any type (#85352)
CollectionUtils contains a method for sorting and deduplicating an hppc list of byte arrays. That is a very specific type. Yet the algorithm for deduplicating a sorted list is very simple and does not need to be specially typed. This commit removes the sort portion of the method, as that is already easily available (and timsort in Java should be just fine for this purpose, we don't need introsort), renames to uniquify, and makes the method take a generic List along with a Comparator. relates #84735
- Loading branch information
Showing
3 changed files
with
62 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters