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

Same-type delegation breaks inlining: counted as recursive inlining

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 8, 9, 10
    • Fix Version/s: tbd
    • Component/s: hotspot

      Description

      Originally reported at:
      http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2012-September/008367.html

      The benchmark is attached, and requires JMH to run.
      This issue still reproduces perfectly well, for the same reason:

      o.o.p.RecursiveBench.chain11: 4.4 +- 0.1 ns/op
      o.o.p.RecursiveBench.chain12: 3.1 +- 0.1 ns/op
      o.o.p.RecursiveBench.empty: 2.0 +- 0.1 ns/op

      This issue also breaks the inlining in the case of JDK 8 Streams, in the scenarios like:
       LongStream.range(1, 10000)
         .filter(i -> i % 3 == 0)
         .filter(i -> i % 5 == 0)
         .sum();

      ...because we create the same wrapper classes for both filters.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated: