> The enanchment is useful for applications that make heavy use of BitSet > objects as sets of integers, and therefore they need to make a lot of calls > to cardinality() method, which actually require linear time in the number of > words in use by the bit set. > This optimization reduces the cost of calling cardinality() to constant time, > as it simply returns the value of the field, and it also try to make as > little effort as possible to update the field, when needed. > > Moreover, it has been implemented a new method for testing wheter a bit set > includes another bit set (i.e., the set of true bits of the parameter is a > subset of the true bits of the instance).
fabioromano1 has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 43 additional commits since the last revision: - Merge branch 'openjdk:master' into patch-2 - Added author to includes(BitSet) - Removed trailing spaces - Format file - Format file - Formatted - Added this. in BitSet(long[]) - Merge branch 'openjdk:master' into patch-2 - Merge branch 'openjdk:master' into patch-2 - Merge branch 'openjdk:master' into patch-2 - ... and 33 more: https://git.openjdk.org/jdk/compare/d391b89f...206e967d ------------- Changes: - all: https://git.openjdk.org/jdk/pull/11837/files - new: https://git.openjdk.org/jdk/pull/11837/files/d06ed69d..206e967d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=11837&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11837&range=01-02 Stats: 9034 lines in 717 files changed: 5331 ins; 1260 del; 2443 mod Patch: https://git.openjdk.org/jdk/pull/11837.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11837/head:pull/11837 PR: https://git.openjdk.org/jdk/pull/11837