-
Enhancement
-
Resolution: Won't Fix
-
P3
-
9
StringTable::intern is a go-to way to convert Symbol* to String oop, see e.g. JDK-8151751. However, it is not very efficient, because it goes through multiple conversions: Symbol* (UTF-8) ---> jchar* (UTF-16?) --> lookup --> java.lang.String (UTF-16/Latin1).
See e.g. the profile for a proof-of-concept patch fromJDK-8151751, StringTable::intern dominates there, and the hottest codepaths inside are UTF8::unicode_length and UTF8::convert_to_unicode that produce jchar* for table lookup.
http://cr.openjdk.java.net/~shade/8153849/StringTable-intern.txt
http://cr.openjdk.java.net/~shade/8153849/Symbol-as-unicode.txt
Making a table to lookup with a Symbol* key would benefit this.
See e.g. the profile for a proof-of-concept patch from
http://cr.openjdk.java.net/~shade/8153849/StringTable-intern.txt
http://cr.openjdk.java.net/~shade/8153849/Symbol-as-unicode.txt
Making a table to lookup with a Symbol* key would benefit this.
- relates to
-
JDK-8151751 Stack trace population code can (re-)use cached Strings
- Closed