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
3 months ago
Test name Executions per second
Number (with string integer) 5452149.5 Ops/sec
Unary + (with string integer) 4129738.5 Ops/sec
parseInt (with string integer) 5569949.5 Ops/sec
Number (with string float) 5653516.5 Ops/sec
Unary + (with string float) 7893255.0 Ops/sec
parseInt (with string float) 5771877.5 Ops/sec
Number (with integer) 6371983.5 Ops/sec
Unary + (with integer) 9559237.0 Ops/sec
parseInt (with integer) 6412733.5 Ops/sec
Number (with float) 7310431.5 Ops/sec
Unary + (with float) 17624038.0 Ops/sec
parseInt (with float) 9412235.0 Ops/sec
Number (with NaN) 16902120.0 Ops/sec
Unary + (with NaN) 469318592.0 Ops/sec
parseInt (with NaN) 17598678.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)


;