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

Improve the performance of BitSet traversal

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 11
    • 9
    • core-libs
    • b19

        Currently BitSet spliterator reports SIZED characteristic calculating the size during binding via cardinality() method which traverses the whole bitset (though more efficiently compared to usual traversal). Currently SIZED characteristic (w/o SUBSIZED) rarely matters (mostly for toArray() terminal operation without intermediate filter). In other cases it may just slow down the spliterator initialization without any gain. Also non-SIZED implementation would be simpler. It would be good to benchmark SIZED and non-SIZED BitSet implementation and switch to non-SIZED implementation if significant performance difference is observed.

              psandoz Paul Sandoz
              tvaleev Tagir Valeev
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: