Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0
Firefox 61
Mac OS X 10.13
Desktop
6 years ago
Test name Executions per second
int*int 166099248.0 Ops/sec
int**2 310091872.0 Ops/sec
Math.pow(int,2) 121420312.0 Ops/sec
float*float 166813728.0 Ops/sec
float**2 295272832.0 Ops/sec
Math.pow(float, 2) 131532256.0 Ops/sec
int*int*int*int*int 66195576.0 Ops/sec
int**5 304807072.0 Ops/sec
Math.pow(int,5) 115868552.0 Ops/sec
float*float*float*float*float 65300996.0 Ops/sec
float**5 285866528.0 Ops/sec
Math.pow(float,5) 126955576.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)