Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
Chrome 68
Mac OS X 10.12.6
Desktop
6 years ago
Test name Executions per second
int*int 6006284.5 Ops/sec
int**2 11002584.0 Ops/sec
Math.pow(int,2) 3622460.2 Ops/sec
float*float 6190920.0 Ops/sec
float**2 10955870.0 Ops/sec
Math.pow(float, 2) 3545393.0 Ops/sec
int*int*int*int*int 2401695.0 Ops/sec
int**5 10841896.0 Ops/sec
Math.pow(int,5) 3572005.8 Ops/sec
float*float*float*float*float 2420122.0 Ops/sec
float**5 10715357.0 Ops/sec
Math.pow(float,5) 3567235.5 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)


;