Run details:
Mozilla/5.0 (Android 7.0; Mobile; rv:61.0) Gecko/61.0 Firefox/61.0
Firefox Mobile 61
Android 7.0
Mobile
6 years ago
Test name Executions per second
int*int 89989912.0 Ops/sec
int**2 145244800.0 Ops/sec
Math.pow(int,2) 54458708.0 Ops/sec
float*float 89232880.0 Ops/sec
float**2 145127088.0 Ops/sec
Math.pow(float, 2) 57017564.0 Ops/sec
int*int*int*int*int 42008352.0 Ops/sec
int**5 143981744.0 Ops/sec
Math.pow(int,5) 55064396.0 Ops/sec
float*float*float*float*float 40339256.0 Ops/sec
float**5 147020864.0 Ops/sec
Math.pow(float,5) 56736828.0 Ops/sec
Script Preparation code:
Tests:
  • int*int

  • int**2

  • Math.pow(int,2)

  • float*float

  • float**2

  • Math.pow(float, 2)

  • int*int*int*int*int

  • int**5

  • Math.pow(int,5)

  • float*float*float*float*float

  • float**5

  • Math.pow(float,5)


;