Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
x ** 0.5 vs Math.sqrt(x)
(version: 0)
Comparing performance of:
Math.sqrt vs sqrt with Math.pow
Created:
one year ago
by:
Guest
Jump to the latest result
Script Preparation code:
var numbers = Array.from(Array(10000), (_,x) => (Math.random()*x));
Tests:
Math.sqrt
numbers.forEach(x => Math.sqrt(x));
sqrt with Math.pow
numbers.forEach(x => x ** 0.5);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Math.sqrt
sqrt with Math.pow
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0
Browser/OS:
Firefox 126 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Math.sqrt
16895.1 Ops/sec
sqrt with Math.pow
32537.6 Ops/sec
Related benchmarks:
Math.sqrt(x) vs x**0.5
Math.pow(x,0.5) vs Math.sqrt(x) 12
(x ** 0.5) vs Math.sqrt(x)
sqrt vs pow vs **
Comments
Confirm delete:
Do you really want to delete benchmark?