Script Preparation code:
Tests:

Historical Performance Data aggregated from 95 community runs

Desktop Results:
Chrome 63 runs
sqrt with Math.pow
2K/s
Math.sqrt
2K/s
View exact numbers
  • sqrt with Math.pow: 1,781 ops/sec
  • Math.sqrt: 1,711 ops/sec
Firefox 25 runs
Math.sqrt
16K/s
sqrt with Math.pow
14K/s

Fastest: Math.sqrt (1.1x faster)

View exact numbers
  • Math.sqrt: 15,805 ops/sec
  • sqrt with Math.pow: 14,118 ops/sec
Mobile Results:
Chrome 7 runs
sqrt with Math.pow
1K/s
Math.sqrt
986/s
View exact numbers
  • sqrt with Math.pow: 1,046 ops/sec
  • Math.sqrt: 986 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Math.sqrt
    sqrt with Math.pow

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 months ago)
Mozilla/5.0 (X11; Linux x86_64; rv:149.0) Gecko/20100101 Firefox/149.0
Firefox 149 on Linux
View result in a separate tab
Math.sqrt
8K/s
sqrt with Math.pow
7K/s
View exact numbers
Test name Executions per second
Math.sqrt 8,046 Ops/sec
sqrt with Math.pow 6,823 Ops/sec