RFR: 8236850: Operations on constant List/Set.of(element) instances does not consistently constant fold
John Rose
john.r.rose at oracle.com
Mon Jan 13 21:33:00 UTC 2020
On Jan 13, 2020, at 1:23 PM, Claes Redestad <claes.redestad at oracle.com> wrote:
>
> On 2020-01-13 22:18, Paul Sandoz wrote:
>> That’s fine, it was really for informational purposes in case it comes in handy later on.
>
> Got it.
>
>> Speculating: if we had such a public method (with minimal dependencies) I suspect we would reach for it in this case even if overkill. It reduces the cognitive load, but as a downside it would not afford us the opportunity of a slice Pi:-)
>
> Not sure it'd pull its own weight as a public API, but refactoring to a
> shared internal utility might be a good start?
Yes. I want it in the JVM so I can use it there also, to fuzz things like
stack positions and TLB chunk sizes and monitor wait times and
central hash table placements.
As long as the core libs only need it for an occasional static constant,
the JNI call overhead will not be a problem.
— John
More information about the core-libs-dev
mailing list