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

Preserve SIZED characteristics on slice operations (skip, limit)

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 17
    • None
    • core-libs
    • None

    Description

      Currently, skip() and limit() operations do not preserve the SIZED characteristics in sequential streams. As a result, having skip() or limit() in sequential stream, makes operations like toArray(), toList() and count() working slower and producing more garbage than necessary. It's possible to keep the SIZED characteristics if we can adjust the size reported by an original spliterator.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: