-
Enhancement
-
Resolution: Fixed
-
P4
-
None
When inflating Utf8 entries to BYTE state, we can use JavaLangAccess::countPositives and ArraysSupport::vectorizedHashCode to simplify the existing code with the same role.
In addition, when a String is created from BYTE state Utf8 entry, it can use the ISO_8859_1 encoding to bypass unnecessary checks for the UTF_8 encoding.
A new benchmark method is added to demonstrate the performance improvement, as the existing ReadMetadata::jdkReadName spends overwhelming majority of its time on Classfile structural parsing. The new benchmark spends about 50% CPU on creating strings from Utf8 entries and can show the effect of this patch more clearly.
In addition, when a String is created from BYTE state Utf8 entry, it can use the ISO_8859_1 encoding to bypass unnecessary checks for the UTF_8 encoding.
A new benchmark method is added to demonstrate the performance improvement, as the existing ReadMetadata::jdkReadName spends overwhelming majority of its time on Classfile structural parsing. The new benchmark spends about 50% CPU on creating strings from Utf8 entries and can show the effect of this patch more clearly.
- relates to
-
JDK-8300493 Use ArraysSupport.vectorizedHashCode in j.u.zip.ZipCoder
-
- Resolved
-