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

    • Enhancement
    • Resolution: Duplicate
    • P4
    • 10
    • 9
    • hotspot

    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

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

              Dates

                Created:
                Updated:
                Resolved: