Run details:
Mozilla/5.0 (X11; CrOS armv7l 10718.71.2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.87 Safari/537.36
Chrome 68
Chrome OS 10718.71.2
Desktop
6 years ago
Test name Executions per second
int*int 1416952.4 Ops/sec
int**2 2477502.2 Ops/sec
Math.pow(int,2) 829612.9 Ops/sec
float*float 1428846.5 Ops/sec
float**2 2390676.2 Ops/sec
Math.pow(float, 2) 830867.3 Ops/sec
int*int*int*int*int 563797.1 Ops/sec
int**5 2537242.5 Ops/sec
Math.pow(int,5) 839716.6 Ops/sec
float*float*float*float*float 558010.6 Ops/sec
float**5 2343120.8 Ops/sec
Math.pow(float,5) 827211.2 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)