Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6.1 Safari/605.1.15
Safari 15
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
Using the pow7() function 2514669.2 Ops/sec
Using the ** operator 3747434.0 Ops/sec
Using Math.pow() 2012362.9 Ops/sec
Multiplying seven times 1079200.8 Ops/sec
Using the pow27() function 2612873.0 Ops/sec
Using the pow37() function 2591672.2 Ops/sec
Using the powMult7() function 2625747.2 Ops/sec
Script Preparation code:
Tests:
  • Using the pow7() function

  • Using the ** operator

  • Using Math.pow()

  • Multiplying seven times

  • Using the pow27() function

  • Using the pow37() function

  • Using the powMult7() function