RFR: 8310813: Simplify and modernize equals, hashCode, and compareTo for BigInteger [v11]

Pavel Rappo prappo at openjdk.org
Wed Jan 10 11:27:53 UTC 2024


> Please review this PR to use modern APIs and language features to simplify equals, hashCode, and compareTo for BigInteger. If you have any performance concerns, please raise them.
> 
> This PR is cherry-picked from a bigger, not-yet-published PR, to test the waters. That latter PR will be published soon.

Pavel Rappo has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 20 commits:

 - Use Integer.compareUnsigned
 - Update copyright years and headers
 - Merge branch 'master' into 8310813
 - Merge branch 'master' into 8310813
 - Merge branch 'master' into 8310813
 - Merge branch 'master' into 8310813
 - Merge branch 'master' into 8310813
 - Fix bugs in Shared.createSingle
 - Merge branch 'master' into 8310813
 - Group params coarser (suggested by @cl4es)
   
   - Splits 20 params into 3 groups: (S)mall, (M)edium and (L)arge.
     Every testXYZ method invokes M operations, where M is the maximum
     number of elements in a group. Shorter groups are cyclically padded.
   - Uses the org.openjdk.jmh.infra.Blackhole API and increases
     benchmark time.
   - Fixes a bug in Shared that precluded 0 from being in a pair.
 - ... and 10 more: https://git.openjdk.org/jdk/compare/bc05893f...08e6adca

-------------

Changes: https://git.openjdk.org/jdk/pull/14630/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14630&range=10
  Stats: 527 lines in 6 files changed: 500 ins; 16 del; 11 mod
  Patch: https://git.openjdk.org/jdk/pull/14630.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14630/head:pull/14630

PR: https://git.openjdk.org/jdk/pull/14630


More information about the core-libs-dev mailing list