Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
Chrome 87
Windows
Desktop
3 years ago
Test name Executions per second
float multiply 3071059.0 Ops/sec
bigInt multiply 2508388.8 Ops/sec
float compare 2987185.0 Ops/sec
bigInt compare 3102722.8 Ops/sec
string compare 2925386.0 Ops/sec
float greater 2990979.0 Ops/sec
bigint greater 2938569.5 Ops/sec
string greater 2916847.5 Ops/sec
toString bigInt 1953342.1 Ops/sec
toString float 5814448.0 Ops/sec
toFloat bigInt 2586870.0 Ops/sec
toFloat string 2097929.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