Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8164189

Collectors.toSet() parallel performance improvement

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
      None

      Description

      Collectors.toSet() combine step may perform faster if we check the set sizes and always add the smaller set into the larger. The element order is insignificant here as HashSet is used and collector is declared as UNORDERED.

        Attachments

          Activity

            People

            Assignee:
            tvaleev Tagir Valeev
            Reporter:
            tvaleev Tagir Valeev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: