• Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: P4 P4
    • 24
    • 24
    • core-libs
    • None

      ConstantPoolBuilder.classEntry(ClassDesc) is having some troubles with ClassDesc: it currently computes a substring and finds the utf8, which involves a new allocation and hash calculation for both hits and misses. Both cases can be optimized.

      Hit improvements:
      1. Use new hashing scheme for ClassEntry so it can be derived from a ClassDesc. Fast return if ClassDesc matches. (This relies on the == fast path in ClassDesc to avoid array scans, assuming we share ClassDesc objects)

      Miss improvements:
      1. Derive utf8 hash from ClassDesc to avoid recomputation when looking up or putting into CP table
      2. Avoid substringing until we confirm there's no matching utf8

      Need to check the results to ensure there's no extra hashing or array scanning done as a regression from these improvements.

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

              Created:
              Updated:
              Resolved: