Run details:
Mozilla/5.0 (Linux; Android 8.0.0; SM-G960F Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) 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 2445699.0 Ops/sec
int**2 3933213.8 Ops/sec
Math.pow(int,2) 1443838.2 Ops/sec
float*float 2443252.2 Ops/sec
float**2 4296182.5 Ops/sec
Math.pow(float, 2) 1456349.1 Ops/sec
int*int*int*int*int 959550.6 Ops/sec
int**5 4412430.0 Ops/sec
Math.pow(int,5) 1444916.0 Ops/sec
float*float*float*float*float 951041.4 Ops/sec
float**5 4230321.5 Ops/sec
Math.pow(float,5) 1065166.6 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)


;