Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15
Safari 17
Mac OS X 10.15.7
Desktop
2 months ago
Test name Executions per second
Number (with string integer) 5452150.0 Ops/sec
Unary + (with string integer) 4129739.0 Ops/sec
parseInt (with string integer) 5569950.0 Ops/sec
Number (with string float) 5653517.0 Ops/sec
Unary + (with string float) 7893255.0 Ops/sec
parseInt (with string float) 5771878.0 Ops/sec
Number (with integer) 6371984.0 Ops/sec
Unary + (with integer) 9559237.0 Ops/sec
parseInt (with integer) 6412734.0 Ops/sec
Number (with float) 7310432.0 Ops/sec
Unary + (with float) 17624040.0 Ops/sec
parseInt (with float) 9412235.0 Ops/sec
Number (with NaN) 16902120.0 Ops/sec
Unary + (with NaN) 469318600.0 Ops/sec
parseInt (with NaN) 17598680.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)