RFR: 8355300: Add final to BitSieve
Chen Liang
liach at openjdk.org
Tue Apr 22 14:24:16 UTC 2025
On Tue, 22 Apr 2025 11:10:46 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.
src/java.base/share/classes/java/math/BitSieve.java line 51:
> 49: * Stores the bits in this bitSieve.
> 50: */
> 51: private final long bits[];
Suggestion:
private final long[] bits;
We can do this too.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24796#discussion_r2054212128
More information about the core-libs-dev
mailing list