Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/68.0.3440.75 Chrome/68.0.3440.75 Safari/537.36
Chromium 68
Ubuntu
Desktop
6 years ago
Test name Executions per second
int*int 7329476.0 Ops/sec
int**2 13076999.0 Ops/sec
Math.pow(int,2) 4412022.0 Ops/sec
float*float 7310731.5 Ops/sec
float**2 12684924.0 Ops/sec
Math.pow(float, 2) 4337556.0 Ops/sec
int*int*int*int*int 2906478.8 Ops/sec
int**5 12823029.0 Ops/sec
Math.pow(int,5) 4375461.0 Ops/sec
float*float*float*float*float 2905513.2 Ops/sec
float**5 12692618.0 Ops/sec
Math.pow(float,5) 4419879.5 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)