Run details:
Mozilla/5.0 (Linux; Android 7.1.1; Mi Note 3 Build/NMF26X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.91 Mobile Safari/537.36
Chrome Mobile 68
Android 7.1.1
Mobile
6 years ago
Test name Executions per second
int*int 2506892.5 Ops/sec
int**2 4157367.5 Ops/sec
Math.pow(int,2) 1562233.5 Ops/sec
float*float 2499190.2 Ops/sec
float**2 4340373.0 Ops/sec
Math.pow(float, 2) 1562647.8 Ops/sec
int*int*int*int*int 961219.0 Ops/sec
int**5 4449051.0 Ops/sec
Math.pow(int,5) 1511996.2 Ops/sec
float*float*float*float*float 983726.3 Ops/sec
float**5 4311726.0 Ops/sec
Math.pow(float,5) 1567864.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)


;