On Tue, 3 Sep 2024 16:13:39 GMT, David M. Lloyd <d...@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`.

The previous code did not verify lack of bci overlap AFAICT, it just picked 
one; do I need to update the bug description or open a new one to add that?

That said, if we guarantee there's no overlap (fail fast) then we only have to 
loop over the array once, which is better still.

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

PR Comment: https://git.openjdk.org/jdk/pull/20841#issuecomment-2327017308

Reply via email to