Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36
Chrome 100
Windows
Desktop
2 years ago
Test name Executions per second
Number (with string integer) 2145652.0 Ops/sec
Unary + (with string integer) 2478987.0 Ops/sec
parseInt (with string integer) 2121550.0 Ops/sec
Number (with string float) 1322752.0 Ops/sec
Unary + (with string float) 1743085.0 Ops/sec
parseInt (with string float) 1481599.0 Ops/sec
Number (with integer) 2210578.0 Ops/sec
Unary + (with integer) 1756548.0 Ops/sec
parseInt (with integer) 1098890.0 Ops/sec
Number (with float) 3239208.0 Ops/sec
Unary + (with float) 6130835.0 Ops/sec
parseInt (with float) 3170059.0 Ops/sec
Number (with NaN) 7204022.0 Ops/sec
Unary + (with NaN) 954354800.0 Ops/sec
parseInt (with NaN) 5425111.0 Ops/sec
Tests:
  • Number (with string integer)

  • Unary + (with string integer)

  • parseInt (with string integer)

  • Number (with string float)

  • Unary + (with string float)

  • parseInt (with string float)

  • Number (with integer)

  • Unary + (with integer)

  • parseInt (with integer)

  • Number (with float)

  • Unary + (with float)

  • parseInt (with float)

  • Number (with NaN)

  • Unary + (with NaN)

  • parseInt (with NaN)