Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36
Chrome 91
Linux
Desktop
3 years ago
Test name Executions per second
Number (with string integer) 3219230.8 Ops/sec
Unary + (with string integer) 4605560.0 Ops/sec
parseInt (with string integer) 3252123.8 Ops/sec
Number (with string float) 1648379.2 Ops/sec
Unary + (with string float) 2161755.8 Ops/sec
parseInt (with string float) 1950424.0 Ops/sec
Number (with integer) 3476380.0 Ops/sec
Unary + (with integer) 5353617.5 Ops/sec
parseInt (with integer) 3331215.0 Ops/sec
Number (with float) 5152656.5 Ops/sec
Unary + (with float) 9780863.0 Ops/sec
parseInt (with float) 5009050.5 Ops/sec
Number (with NaN) 10995375.0 Ops/sec
Unary + (with NaN) 828804416.0 Ops/sec
parseInt (with NaN) 6770004.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)