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

Reduce number of lambda forms generated by MethodHandleInlineCopyStrategy

    Details

    • Subcomponent:
    • Introduced In Build:
      b120
    • Introduced In Version:
      9
    • Resolved In Build:
      b136
    • Verification:
      Not verified

      Description

      StringConcatFactory$MethodHandleInlineCopyStrategy was made the default strategy in 9+120, which brought with it a number of startup regressions and other issues in exchange for better peak performance.

      Examining the implementation it appears there are ways we could optimize the number of LF shapes generated by either:

      - introducing more powerful MethodHandles methods to do foldArguments on a selectable set of parameters[1]
      - bypass public API entirely and generate the LF shape entirely by hand to avoid intermediary shapes.
      - other?

      As of this point in time it's too late to introduce new public API methods in 9, so the first alternative would by necessity be a bypass-light. This would keep the StringConcatFactory implementation mostly intact and showcase the need to improve on and/or extend the public API for a later release

      [1] http://cr.openjdk.java.net/~redestad/scratch/selecting_fold.02/

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: