Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8316587

Use ArraysSupport.vectorizedHashCode in Utf8EntryImpl

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 22
    • None
    • core-libs

      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.

            liach Chen Liang
            liach Chen Liang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: