Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36
Chrome 92
Windows
Desktop
3 years ago
Test name Executions per second
Number (with string integer) 1168449.0 Ops/sec
Unary + (with string integer) 1446014.0 Ops/sec
parseInt (with string integer) 1073095.0 Ops/sec
Number (with string float) 581010.4 Ops/sec
Unary + (with string float) 890738.6 Ops/sec
parseInt (with string float) 802123.6 Ops/sec
Number (with integer) 1245876.0 Ops/sec
Unary + (with integer) 1787420.0 Ops/sec
parseInt (with integer) 1213404.0 Ops/sec
Number (with float) 1811846.0 Ops/sec
Unary + (with float) 3354004.0 Ops/sec
parseInt (with float) 1766056.0 Ops/sec
Number (with NaN) 4037942.0 Ops/sec
Unary + (with NaN) 714488600.0 Ops/sec
parseInt (with NaN) 2777649.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)