RFR: 8198888: Reduce string allocation churn in InvokerBytecodeGenerator
Paul Sandoz
paul.sandoz at oracle.com
Thu Mar 1 17:57:54 UTC 2018
It’s not just the internal VM name, it's also a descriptor in byte code.
I hope the symbolic ref API currently being designed in the amber repo will help here. Until that settles i would be reluctant to consider adding public “toDescriptor” methods, or even do something internally right now if we can sweep it all up later on.
(Further, the symbolic ref API may also be an opportunity to clean up the parsing side of things too.)
Pau.
> On Mar 1, 2018, at 5:31 AM, Claes Redestad <claes.redestad at oracle.com> wrote:
>
> That few, huh? Well, if you ask me the VM internal name and the java class names should have been synced up long ago. :-)
>
> I'd not be averse to some real API point in a future RFE. I think this has been dodged in the past to avoid leaking the VM internal representation everywhere.
>
> /Claes
>
> On 2018-03-01 14:17, Peter Levart wrote:
>> Hi Claes,
>>
>> 623 name = c.getName().replace('.', '/');
>>
>> Did you know that there are 319 occurrences of .replace('.', '/') in JDK sources and tests (45 occurrences in java.base without tests)?
>>
>> Isn't that enough to create a special API on the java.lang.Class that would cache this or at least something in an internal java.base package?
>>
>> Regards, Peter
>>
>> On 03/01/2018 01:14 PM, Claes Redestad wrote:
>>> Hi,
>>>
>>> two trivial optimizations that get rid of a few percent on ISC startup tests.
>>>
>>> Webrev: http://cr.openjdk.java.net/~redestad/8198888/jdk.00/
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8198888
>>>
>>> Thanks!
>>>
>>> /Claes
>>
>
More information about the core-libs-dev
mailing list