Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36
Chrome 96
Linux
Desktop
2 years ago
Test name Executions per second
Number (with string integer) 3768708.0 Ops/sec
Unary + (with string integer) 5536387.0 Ops/sec
parseInt (with string integer) 3845720.5 Ops/sec
Number (with string float) 2073471.2 Ops/sec
Unary + (with string float) 2625599.5 Ops/sec
parseInt (with string float) 2438026.5 Ops/sec
Number (with integer) 3912582.2 Ops/sec
Unary + (with integer) 5837432.5 Ops/sec
parseInt (with integer) 3832011.5 Ops/sec
Number (with float) 5833075.0 Ops/sec
Unary + (with float) 10994472.0 Ops/sec
parseInt (with float) 5497791.5 Ops/sec
Number (with NaN) 11929107.0 Ops/sec
Unary + (with NaN) 874154560.0 Ops/sec
parseInt (with NaN) 8714247.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)


;