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

Optimize the code-gen for Math.pow(x, 0.5)

    XMLWordPrintable

Details

    • b19

    Description

      Math.pow(x, 0.5) --> Math.sqrt(x)

      Before:
      ```
      Benchmark (seed) Mode Cnt Score Error Units
      MathBench.powDouble0Dot5 0 thrpt 8 45525.117 ? 11.686 ops/ms
      MathBench.powDouble0Dot5Loop 0 thrpt 8 0.031 ? 0.001 ops/ms

      Benchmark (seed) Mode Cnt Score Error Units
      MathBench.powDouble0Dot5 0 thrpt 8 45509.317 ? 6.581 ops/ms
      MathBench.powDouble0Dot5Loop 0 thrpt 8 0.031 ? 0.001 ops/ms
      ```

      After:
      ```
      Benchmark (seed) Mode Cnt Score Error Units
      MathBench.powDouble0Dot5 0 thrpt 8 343354.892 ? 362.900 ops/ms
      MathBench.powDouble0Dot5Loop 0 thrpt 8 0.457 ? 0.001 ops/mso

      Benchmark (seed) Mode Cnt Score Error Units
      MathBench.powDouble0Dot5 0 thrpt 8 343421.559 ? 49.326 ops/ms
      MathBench.powDouble0Dot5Loop 0 thrpt 8 0.457 ? 0.001 ops/ms
      ```

      Attachments

        Issue Links

          Activity

            People

              jiefu Jie Fu
              jiefu Jie Fu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: