Run details:
Mozilla/5.0 (Linux; Android 10; M2010J19CG) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.98 Mobile Safari/537.36
Chrome Mobile 97
Android
Mobile
3 years ago
Test name Executions per second
Math.sqrt 182.3 Ops/sec
sqrt with Math.pow 184.6 Ops/sec
Script Preparation code:
AخA
 
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 => Math.pow(x,0.5));