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

Reduce overhead of initializing the StringConcatFactory default strategy

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 15
    • Component/s: core-libs

      Description

      During initialization, we currently lookup a handle to get the initialCoder:

      try {
          MethodHandle initCoder = JLA.stringConcatHelper("initialCoder", methodType(long.class));
          INITIAL_CODER = (long) initCoder.invoke();
      } catch (Throwable e) {
          throw new AssertionError(e);
      }

      Supplying a shared secret method in JLA instead reduces initialization overhead by a few million instructions (~0.5ms).

        Attachments

          Activity

            People

            • Assignee:
              redestad Claes Redestad
              Reporter:
              redestad Claes Redestad
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: