Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
Chrome 68
Mac OS X 10.13.5
Desktop
6 years ago
Test name Executions per second
int*int 5837442.5 Ops/sec
int**2 10688763.0 Ops/sec
Math.pow(int,2) 3301200.8 Ops/sec
float*float 6002447.5 Ops/sec
float**2 10594472.0 Ops/sec
Math.pow(float, 2) 3374470.5 Ops/sec
int*int*int*int*int 2329301.0 Ops/sec
int**5 10702097.0 Ops/sec
Math.pow(int,5) 3400265.5 Ops/sec
float*float*float*float*float 2269628.0 Ops/sec
float**5 10220381.0 Ops/sec
Math.pow(float,5) 3384202.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)


;