Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0
Firefox 63
Windows
Desktop
6 years ago
Test name Executions per second
int*int 228609728.0 Ops/sec
int**2 417193184.0 Ops/sec
Math.pow(int,2) 165264288.0 Ops/sec
float*float 226400208.0 Ops/sec
float**2 406259776.0 Ops/sec
Math.pow(float, 2) 176462688.0 Ops/sec
int*int*int*int*int 90683264.0 Ops/sec
int**5 415184704.0 Ops/sec
Math.pow(int,5) 164294336.0 Ops/sec
float*float*float*float*float 91653696.0 Ops/sec
float**5 406241088.0 Ops/sec
Math.pow(float,5) 178004176.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)