Run details:
Mozilla/5.0 (Linux; Android 8.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Focus/6.0 Chrome/68.0.3440.91 Mobile Safari/537.36
Chrome Mobile 68
Android 8.0.0
Mobile
6 years ago
Test name Executions per second
int*int 2044456.4 Ops/sec
int**2 3475785.0 Ops/sec
Math.pow(int,2) 1132167.9 Ops/sec
float*float 2031905.1 Ops/sec
float**2 3387528.2 Ops/sec
Math.pow(float, 2) 1191275.4 Ops/sec
int*int*int*int*int 785184.9 Ops/sec
int**5 3475757.0 Ops/sec
Math.pow(int,5) 1207999.2 Ops/sec
float*float*float*float*float 744518.1 Ops/sec
float**5 3397079.2 Ops/sec
Math.pow(float,5) 1189755.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)


;