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

StringConcat MH_INLINE_SIZED_EXACT should skip storage initialization

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P3
    • 9
    • 9
    • core-libs
    • b112

    Description

      MH_INLINE_SIZED_EXACT strategy is known to win in many cases where OptimizeStringConcat does not work, but it is penalized when OptimizeStringConcat does work:
       http://cr.openjdk.java.net/~shade/8150463/perf-bad.txt

      "perfasm" profiling shows this is because MH_INLINE_SIZED_EXACT has to allocate the underlying storage from Java, which requires zeroing; while C2 is able to avoid zeroing altogether, because it knows the array would get overwritten completely:
        http://cr.openjdk.java.net/~shade/8150463/BC_SB.perfasm
        http://cr.openjdk.java.net/~shade/8150463/MH_INLINE_SIZED_EXACT.perfasm

      We need to solve this before switching to most optimal concat strategy.

      Attachments

        Issue Links

          Activity

            People

              shade Aleksey Shipilev
              shade Aleksey Shipilev
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: