RFR: 8339492: StackMapDecoder::writeFrames makes lots of allocations
Chen Liang
liach at openjdk.org
Tue Sep 3 16:38:18 UTC 2024
On Tue, 3 Sep 2024 16:13:39 GMT, David M. Lloyd <duke at openjdk.org> wrote:
> Please review this change, which reduces the number of allocations in `StackMapDecoder::writeFrames` by using a sorted array instead of a `TreeMap<Integer, ...>` to sort and uniquify entries before writing.
>
> Tested using `StackMapsTest`.
Since users supply stack maps, they probably should ensure there's no bci overlap, and we can probably just fail-fast if they do supply duplicate entries.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20841#issuecomment-2326967359
More information about the core-libs-dev
mailing list