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

Reduce repeated MH.insertArguments on StringConcatFactory prependers by caching variants with null arguments inserted

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: 14
    • Component/s: core-libs

      Description

      In StringConcatFactory, we optimized the number of possible shapes by a large factor by consolidating prependers to a single shape which takes possibly null prefix and suffix constants. The bootstrap overheads of this could be optimized further by caching variants where the null values are pre-inserted, which reduce work in a common setup step:

      http://cr.openjdk.java.net/~redestad/scratch/scf_cache_null_prependers.00/

      This indicated a speed-up on certain stress tests, without affecting the total number of shapes / classes generated. The PoC patch adds a few anonymous classes which marginally regress first-off bootstrap, but creation of these could probably be made lazy with a little work.

        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: