Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36
Chrome 92
Mac OS X 10.15.7
Desktop
3 years ago
Test name Executions per second
Number (with string integer) 2745622.0 Ops/sec
Unary + (with string integer) 4071960.0 Ops/sec
parseInt (with string integer) 2822711.0 Ops/sec
Number (with string float) 1445025.0 Ops/sec
Unary + (with string float) 1784338.0 Ops/sec
parseInt (with string float) 1714018.0 Ops/sec
Number (with integer) 3047634.0 Ops/sec
Unary + (with integer) 4513345.0 Ops/sec
parseInt (with integer) 2957999.0 Ops/sec
Number (with float) 4496064.0 Ops/sec
Unary + (with float) 8636079.0 Ops/sec
parseInt (with float) 4230364.0 Ops/sec
Number (with NaN) 9018727.0 Ops/sec
Unary + (with NaN) 970014700.0 Ops/sec
parseInt (with NaN) 6509537.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)