Run details:
Mozilla/5.0 (Linux; Android 7.1.1; SM-J700T Build/NMF26X; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 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 666314.9 Ops/sec
int**2 1194980.4 Ops/sec
Math.pow(int,2) 414195.1 Ops/sec
float*float 687477.6 Ops/sec
float**2 1157538.9 Ops/sec
Math.pow(float, 2) 417689.0 Ops/sec
int*int*int*int*int 264094.1 Ops/sec
int**5 1226012.1 Ops/sec
Math.pow(int,5) 398547.4 Ops/sec
float*float*float*float*float 250236.0 Ops/sec
float**5 1176502.4 Ops/sec
Math.pow(float,5) 388719.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)