RFR: 8355300: Add final to BitSieve [v2]

Per Minborg pminborg at openjdk.org
Tue Apr 22 15:26:42 UTC 2025


On Tue, 22 Apr 2025 15:07:29 GMT, Shaojin Wen <swen at openjdk.org> wrote:

>> As the title says, adding final to fields that do not change and BitSieve that will not be inherited will make C2 optimization more friendly.
>
> Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update src/java.base/share/classes/java/math/BitSieve.java
>   
>   Co-authored-by: Chen Liang <liach at openjdk.org>

LGTM. The class is package private and so, no external user can ever extend the class or access the fields so we do not need a CSR. Once we get "final means final", performance might go up.

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

Marked as reviewed by pminborg (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/24796#pullrequestreview-2784508057


More information about the core-libs-dev mailing list