Script Preparation code:
Tests:

Historical Performance Data aggregated from 26 community runs

Desktop Results:
Chrome 18 runs
sqrt with Math.pow
373K/s
Math.sqrt
139K/s

Fastest: sqrt with Math.pow (2.7x faster)

View exact numbers
  • sqrt with Math.pow: 372,513 ops/sec
  • Math.sqrt: 139,005 ops/sec
Firefox 8 runs
sqrt with Math.pow
17K/s
Math.sqrt
16K/s
View exact numbers
  • sqrt with Math.pow: 16,611 ops/sec
  • Math.sqrt: 16,466 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: 6 days ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36
Chrome 138 on Windows
View result in a separate tab
Math.sqrt
22K/s
sqrt with Math.pow
18K/s
View exact numbers
Test name Executions per second
Math.sqrt 22,274 Ops/sec
sqrt with Math.pow 17,873 Ops/sec