Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36
Chrome 102
Linux
Desktop
2 years ago
Test name Executions per second
Number (with string integer) 1703722.1 Ops/sec
Unary + (with string integer) 2525228.8 Ops/sec
parseInt (with string integer) 1728616.6 Ops/sec
Number (with string float) 940537.2 Ops/sec
Unary + (with string float) 1224855.0 Ops/sec
parseInt (with string float) 1087255.5 Ops/sec
Number (with integer) 1809799.5 Ops/sec
Unary + (with integer) 2664294.2 Ops/sec
parseInt (with integer) 1773685.6 Ops/sec
Number (with float) 2692126.2 Ops/sec
Unary + (with float) 5246410.0 Ops/sec
parseInt (with float) 2591224.2 Ops/sec
Number (with NaN) 5472817.5 Ops/sec
Unary + (with NaN) 501199040.0 Ops/sec
parseInt (with NaN) 3665443.8 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)


;