I guess the reporter meant to limit the cache range similarly to the one
used for valueOf().
I have no clue about the benefit/cost ratio for the proposed String
cache. It really depends on usage, workload, etc. One can easily imagine
both extreme scenarios but it's hard to tell how the average one would look.
My post is only about either solving the issue by implementing the
cache, which I can contribute to; or closing it because of lack of
real-world need or interest.
Greetings
Raffaello
On 2021-04-16 20:36, Roger Riggs wrote:
Hi,
Is there any way to quantify the savings?
And what technique can be applied to limit the size of the cache.
The size of the small integer cache is somewhat arbitrary.
Regards, Roger
On 4/16/21 12:48 PM, Raffaello Giulietti wrote:
Hello,
does the enhancement proposed in [1] make sense, both today and when
wrappers will be migrated to primitive classes?
If so, it should be rather simple to add it and I could prepare a PR.
If not, the issue might perhaps be closed.
Greetings
Raffaello
----
[1] https://bugs.openjdk.java.net/browse/JDK-8252827