Run details:
Mozilla/5.0 (Linux; Android 8.1.0; TA-1004 Build/OPR1.170623.026; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/68.0.3440.91 Mobile Safari/537.36
Chrome Mobile 68
Android 8.1.0
Mobile
6 years ago
Test name Executions per second
int*int 2712723.5 Ops/sec
int**2 4790662.0 Ops/sec
Math.pow(int,2) 1600428.2 Ops/sec
float*float 2722891.8 Ops/sec
float**2 4686235.5 Ops/sec
Math.pow(float, 2) 1551381.0 Ops/sec
int*int*int*int*int 1078222.4 Ops/sec
int**5 4811831.0 Ops/sec
Math.pow(int,5) 1600692.8 Ops/sec
float*float*float*float*float 1059038.0 Ops/sec
float**5 4689126.0 Ops/sec
Math.pow(float,5) 1568768.9 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)


;