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.2 Ops/sec
Unary + (with string integer) 2478987.0 Ops/sec
parseInt (with string integer) 2121550.2 Ops/sec
Number (with string float) 1322751.5 Ops/sec
Unary + (with string float) 1743085.2 Ops/sec
parseInt (with string float) 1481598.9 Ops/sec
Number (with integer) 2210577.8 Ops/sec
Unary + (with integer) 1756547.8 Ops/sec
parseInt (with integer) 1098889.9 Ops/sec
Number (with float) 3239207.5 Ops/sec
Unary + (with float) 6130834.5 Ops/sec
parseInt (with float) 3170059.0 Ops/sec
Number (with NaN) 7204021.5 Ops/sec
Unary + (with NaN) 954354816.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)