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

Pack MethodHandleInlineStrategy coder and length into a long

    Details

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

      Description

      Packing the coder and length into a long allows us to generate fewer intermediary method handles for indified String concat expressions. Theoretically close to a third less for concatenation of non-constant-String, Object and char.

      Care had to be taken to ensure the JITs are as good to optimize the resulting MH, and microbenchmarks show that C2 is as good to optimize the new code. Sometimes a few instructions better, sometimes a few instructions worse.

      Attached benchmark and results show that when running in interpreted mode the patch is significantly faster (the overhead of calling more combiners and methods outweigh the extra cost of unpacking coder and length), while in C1 there is a similar slowdown.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: