RFR(S): 8067471: Use private static final char[0] for empty Strings

Lev Priima lev.priima at oracle.com
Fri Dec 19 18:34:01 UTC 2014


Agree, but it's not just style. More formal, Implementation of same 
requirements(both performance and functional) in less code, is an src 
quality metric.

On 12/19/2014 08:52 PM, Aleksey Shipilev wrote:
> On 21.12.2014 18:37, Lev Priima wrote:
>> Thanks for exhaustive research. Looks formal enough to claim that both
>> variants of change bring only perf advantages, but, as I understand,
>> which one is better is not so straightforward.
> Both are sound performance-wise, and you can see that they produce
> almost the similar assembly (I would guess static finals and constant
> pool entires really share the same memory arena).
>
> So the choice is the actual style. I like the cuteness of "".value().
"".value
>
> -Aleksey.
>
>

-- 
Best Regards,
Lev




More information about the core-libs-dev mailing list