RFR: 8302818: Optimize wrapper sets and immutable sets of Enums [v7]
Stuart Marks
smarks at openjdk.org
Wed Mar 22 16:20:04 UTC 2023
On Wed, 22 Mar 2023 01:22:37 GMT, Tingjun Yuan <duke at openjdk.org> wrote:
>> Currently, the two subclasses of `java.util.EnumSet` optimize bulk operations when the argument is also a `EnumSet`, but there is no such optimization for wrapper sets (returned by `Collections.unmodifiableSet`, `Collections.synchronizedSet`, etc.) and immutable sets (returned by `Set.of` methods) of `Enum`s.
>>
>> This PR introduces optimization classes for these situations. No public APIs are changed.
>
> Tingjun Yuan has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix a whitespace error
I agree with Claes here in my skepticism of the usefulness of this sort of change. It seems like it's adding lots of complexity. In addition, it also seems like there's a lot of churn in the design. I'd suggest returning this PR to draft status until it can be determined that there's a clear, net improvement.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/12498#issuecomment-1479872159
More information about the core-libs-dev
mailing list