Run details:
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.183 Safari/537.36 Vivaldi/1.96.1147.52
Chrome 65
Windows
Desktop
6 years ago
Test name Executions per second
int*int 5907087.0 Ops/sec
int**2 10410170.0 Ops/sec
Math.pow(int,2) 3440128.8 Ops/sec
float*float 6017754.5 Ops/sec
float**2 10624376.0 Ops/sec
Math.pow(float, 2) 3379399.8 Ops/sec
int*int*int*int*int 2411692.8 Ops/sec
int**5 10876012.0 Ops/sec
Math.pow(int,5) 3437593.0 Ops/sec
float*float*float*float*float 2423986.2 Ops/sec
float**5 10551661.0 Ops/sec
Math.pow(float,5) 3430591.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)


;