Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36
Chrome 111
Linux
Desktop
one year ago
Test name Executions per second
Number (with string integer) 3239867.0 Ops/sec
Unary + (with string integer) 4675523.0 Ops/sec
parseInt (with string integer) 3263047.0 Ops/sec
Number (with string float) 2172589.0 Ops/sec
Unary + (with string float) 2844395.0 Ops/sec
parseInt (with string float) 2519274.0 Ops/sec
Number (with integer) 3425670.0 Ops/sec
Unary + (with integer) 5059278.0 Ops/sec
parseInt (with integer) 3386384.0 Ops/sec
Number (with float) 5082517.0 Ops/sec
Unary + (with float) 9745916.0 Ops/sec
parseInt (with float) 4883369.0 Ops/sec
Number (with NaN) 10476080.0 Ops/sec
Unary + (with NaN) 970998700.0 Ops/sec
parseInt (with NaN) 10478100.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)