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

Small arraycopy of non-constant length is slower than individual load/stores

    Details

      Description

      JDK-6912521 added support for exploding arraycopy into the series of individual loads and stores. However, that apparently only works when copy size is statically known. In some interesting cases, it does not, see e.g. JDK-8148937, that uses String APIs doing the arraycopies for trivial delimiters, and that apparently penalizes performance.

      Benchmark + performance data:
       http://cr.openjdk.java.net/~shade/8149758/ArrayCopyDynamic.java

      Runnable JAR:
       http://cr.openjdk.java.net/~shade/8149758/benchmarks.jar

        Issue Links

          Activity

          Hide
          shade Aleksey Shipilev added a comment - - edited
          Not really sure about "compiler" designation, since arraycopy handling is a cross-cutting issue for the entire runtime.
          Show
          shade Aleksey Shipilev added a comment - - edited Not really sure about "compiler" designation, since arraycopy handling is a cross-cutting issue for the entire runtime.
          Hide
          zmajo Zoltan Majo (Inactive) added a comment - - edited
          From the compiler's side, both C1 and C2 seem to be affected. I'm not sure if it makes sense the runtime team to look into this (or work in collaboration between the compiler and runtime teams). I kept JDK-8150730 at compiler for the same reason.
          Show
          zmajo Zoltan Majo (Inactive) added a comment - - edited From the compiler's side, both C1 and C2 seem to be affected. I'm not sure if it makes sense the runtime team to look into this (or work in collaboration between the compiler and runtime teams). I kept JDK-8150730 at compiler for the same reason.

            People

            • Assignee:
              Unassigned
              Reporter:
              shade Aleksey Shipilev
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: