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) 3845721.0 Ops/sec
Number (with string float) 2073471.0 Ops/sec
Unary + (with string float) 2625600.0 Ops/sec
parseInt (with string float) 2438027.0 Ops/sec
Number (with integer) 3912582.0 Ops/sec
Unary + (with integer) 5837433.0 Ops/sec
parseInt (with integer) 3832012.0 Ops/sec
Number (with float) 5833075.0 Ops/sec
Unary + (with float) 10994470.0 Ops/sec
parseInt (with float) 5497792.0 Ops/sec
Number (with NaN) 11929110.0 Ops/sec
Unary + (with NaN) 874154600.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)