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

Regression when using Valhalla JVM

XMLWordPrintable

      Attached is a benchmark which I run on top of a Valhalla branch on which I added support for latest JEP 419 API. The branch can be found here:

      https://github.com/mcimadamore/valhalla/tree/valhalla%2Bpanama

      The benchmark results are somewhat surprising: using jdk/jdk numbers are much better than when using valhalla (note that the benchmark does not use primitive classes).

      Also, using `-prof gc` reveals that there's a lot more allocation in valhalla than in jdk/jdk:

      jdk/jdk

      Benchmark Mode Cnt Score Error Units
      PointerBenchmarkSimple.testPointerPointerSimpleInt avgt 30 1.562 ± 0.025 ms/op
      PointerBenchmarkSimple.testPointerPointerSimpleInt:·gc.alloc.rate avgt 30 ≈ 10⁻³ MB/sec
      PointerBenchmarkSimple.testPointerPointerSimpleInt:·gc.alloc.rate.norm avgt 30 1.348 ± 0.054 B/op
      PointerBenchmarkSimple.testPointerPointerSimpleInt:·gc.count avgt 30 ≈ 0 counts

      valhalla

      Benchmark Mode Cnt Score Error Units
      PointerBenchmarkSimple.testPointerPointerSimpleInt avgt 30 5.149 ± 0.071 ms/op
      PointerBenchmarkSimple.testPointerPointerSimpleInt:·gc.alloc.rate avgt 30 3711.721 ± 50.648 MB/sec
      PointerBenchmarkSimple.testPointerPointerSimpleInt:·gc.alloc.rate.norm avgt 30 40001540.338 ± 95.530 B/op
      PointerBenchmarkSimple.testPointerPointerSimpleInt:·gc.churn.G1_Eden_Space avgt 30 3696.540 ± 213.533 MB/sec
      PointerBenchmarkSimple.testPointerPointerSimpleInt:·gc.churn.G1_Eden_Space.norm avgt 30 39838313.042 ± 2247813.921 B/op
      PointerBenchmarkSimple.testPointerPointerSimpleInt:·gc.churn.G1_Survivor_Space avgt 30 0.029 ± 0.015 MB/sec
      PointerBenchmarkSimple.testPointerPointerSimpleInt:·gc.churn.G1_Survivor_Space.norm avgt 30 310.224 ± 166.228 B/op
      PointerBenchmarkSimple.testPointerPointerSimpleInt:·gc.count avgt 30 169.000 counts
      PointerBenchmarkSimple.testPointerPointerSimpleInt:·gc.time avgt 30 116.000 ms

            thartmann Tobias Hartmann
            mcimadamore Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: