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

StringTable::lookup_shared should not compute hash code if shared table is empty

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 9
    • Fix Version/s: 10
    • Component/s: hotspot
    • Labels:

      Description

      This is a performance bug.

      oop StringTable::lookup_shared(jchar* name, int len) {
        return _shared_table.lookup((const char*)name,
                                    java_lang_String::hash_code(name, len), len);
      }

      There's no point of calculating the hash code if _shared_table is empty.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jiangli Jiangli Zhou
              Reporter:
              iklam Ioi Lam
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: