RFR: 8357798: ReverseOrderListView allocates Boolean boxes
Aleksey Shipilev
shade at openjdk.org
Tue May 27 07:38:52 UTC 2025
On Mon, 26 May 2025 19:01:35 GMT, Chen Liang <liach at openjdk.org> wrote:
> How is this an allocation? I examined `javap -c -p -v java.util.ReverseOrderListView` and confirmed this compiles to `Boolean.valueOf` in class files, which involves no new allocation.
Yeah, I brain-fogged a little here. Still, it makes sense to avoid an _object_ when a primitive field would do.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25456#issuecomment-2911481864
More information about the core-libs-dev
mailing list