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

Preserve SIZED characteristics on slice operations (skip, limit)

XMLWordPrintable

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

      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.

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

              Created:
              Updated:
              Resolved: