On Wed, 19 Jun 2024 11:58:07 GMT, Aleksey Shipilev <sh...@openjdk.org> wrote:

> @AlanBateman -- could you please take a look? Thanks.

There was a lot of heap analysis done a few years ago that shined a light on 
the number of empty collections in a typical heap. I don't recall seeing COWAL 
in any of the data but it seems plausible that there are cases where there are 
a lot of empty COWAL instances in the heap.

Main thing for a change like this to make sure it doesn't hurt other cases and 
check if there are overridable methods used in the existing + updated 
implementations that might get reported as a behavior change by something that 
extends and overrides some methods. I don't see anything so I think it's okay.

One thing that surprises me is the change to remove(Object) to handle the case 
where the last remaining element is removed. Does that help the application 
that prompted this changed? Part of wonders if remove(int) needs to do the same 
as someone will show up sometime to ask.

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

PR Comment: https://git.openjdk.org/jdk/pull/19527#issuecomment-2178649021

Reply via email to