Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3418.2 Safari/537.36
Chrome 68
Windows
Other
6 years ago
Test name Executions per second
float multiply 3182306.0 Ops/sec
bigInt multiply 2377274.0 Ops/sec
float compare 3176812.0 Ops/sec
bigInt compare 3118974.0 Ops/sec
string compare 3374900.0 Ops/sec
float greater 3184778.0 Ops/sec
bigint greater 2935429.0 Ops/sec
string greater 3397047.0 Ops/sec
toString bigInt 1942720.0 Ops/sec
toString float 5512637.0 Ops/sec
toFloat bigInt 2750533.0 Ops/sec
toFloat string 2095405.0 Ops/sec
Script Preparation code:
Tests:
  • float multiply

  • bigInt multiply

  • float compare

  • bigInt compare

  • string compare

  • float greater

  • bigint greater

  • string greater

  • toString bigInt

  • toString float

  • toFloat bigInt

  • toFloat string