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

Nashorn performance regression in JDK9 b103

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 9
    • Fix Version/s: None
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Introduced In Build:
      b103
    • CPU:
      generic
    • OS:
      generic

      Description

      There is a significant performance regression in JDK9 b103 when running the Octane Richards benchmark in Nashorn. Performance is less then half compared to b102. Other benchmarks are not affected, this is specific to Richards.

      Some quick profiling reveals that a lot of time is now spent in various java.lang.invoke.LambdaForm$DMH.invoke* methods that used to be very fast before.

      To reproduce check out the Nashorn repository and run the Octane Richards benchmark using Ant:

      > cd make
      > export JAVA_HOME=...
      > ant octane-richards

      Results with JDK9 b102:

      run-octane-nashorn:
           [java] [nashorn] [richards] loading 'richards' [richards.js]... /home/hannes/work/nashorn9-dev/test/script/basic/../external/octane/richards.js
           [java] [nashorn] [richards] running 'richards' for 25 iterations of no less than 5 seconds
           [java] [nashorn] [richards] warmup finished 33528 ops/minute
           [java] [nashorn] [richards] iteration 1 finished 169464 ops/minute
           [java] [nashorn] [richards] iteration 2 finished 186600 ops/minute
           [java] [nashorn] [richards] iteration 3 finished 183816 ops/minute
           [java] [nashorn] [richards] iteration 4 finished 179796 ops/minute
           [java] [nashorn] [richards] iteration 5 finished 191148 ops/minute
           [java] [nashorn] [richards] iteration 6 finished 176904 ops/minute
           [java] [nashorn] [richards] iteration 7 finished 190692 ops/minute
           [java] [nashorn] [richards] iteration 8 finished 193392 ops/minute

      Results with JDK9 b103:

      run-octane-nashorn:
           [java] [nashorn] [richards] loading 'richards' [richards.js]... /home/hannes/work/nashorn9-dev/test/script/basic/../external/octane/richards.js
           [java] [nashorn] [richards] running 'richards' for 25 iterations of no less than 5 seconds
           [java] [nashorn] [richards] warmup finished 33113 ops/minute
           [java] [nashorn] [richards] iteration 1 finished 70788 ops/minute
           [java] [nashorn] [richards] iteration 2 finished 74232 ops/minute
           [java] [nashorn] [richards] iteration 3 finished 60504 ops/minute
           [java] [nashorn] [richards] iteration 4 finished 72144 ops/minute
           [java] [nashorn] [richards] iteration 5 finished 69792 ops/minute
           [java] [nashorn] [richards] iteration 6 finished 69048 ops/minute
           [java] [nashorn] [richards] iteration 7 finished 74832 ops/minute
           [java] [nashorn] [richards] iteration 8 finished 76452 ops/minute


        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ecaspole Eric Caspole
                Reporter:
                hannesw Hannes Wallnoefer
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: