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

Performance regression in Math.cbrt

XMLWordPrintable

    • b05
    • x86_64

        https://bugs.openjdk.org/browse/JDK-8353686 intrinsifies Math.cbrt API with optimized Libm intrinsic, but causes is a regression for special double values.

        With Intrinsic Disabled:-

        Benchmark Mode Cnt Score Error Units
        CbrtPerf.CbrtPerfSpecialValues.cbrtDouble0 thrpt 2 1343559.770 ops/ms
        CbrtPerf.CbrtPerfSpecialValues.cbrtDoubleInf thrpt 2 881930.283 ops/ms
        CbrtPerf.CbrtPerfSpecialValues.cbrtDoubleNaN thrpt 2 973307.409 ops/ms
        CbrtPerf.CbrtPerfSpecialValues.cbrtDoubleNegative0 thrpt 2 1342454.046 ops/ms
        CbrtPerf.CbrtPerfSpecialValues.cbrtDoubleNegativeInf thrpt 2 880169.071 ops/ms

        With Intrinsic Enabled:-

        Benchmark Mode Cnt Score Error Units
        CbrtPerf.CbrtPerfSpecialValues.cbrtDouble0 thrpt 2 293228.991 ops/ms
        CbrtPerf.CbrtPerfSpecialValues.cbrtDoubleInf thrpt 2 329190.573 ops/ms
        CbrtPerf.CbrtPerfSpecialValues.cbrtDoubleNaN thrpt 2 334625.414 ops/ms
        CbrtPerf.CbrtPerfSpecialValues.cbrtDoubleNegative0 thrpt 2 270939.709 ops/ms
        CbrtPerf.CbrtPerfSpecialValues.cbrtDoubleNegativeInf thrpt 2 328087.618 ops/ms

        Intrinsic penalizes special case performance to optimize a more generic control path while Java implimentation handles them upfront.

              missa Mohamed Issa
              jbhateja Jatin Bhateja
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: