Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15
Safari 16
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
Number (with string integer) 5011013.0 Ops/sec
Unary + (with string integer) 6791675.0 Ops/sec
parseInt (with string integer) 5542417.0 Ops/sec
Number (with string float) 3988913.0 Ops/sec
Unary + (with string float) 5002235.0 Ops/sec
parseInt (with string float) 4889272.0 Ops/sec
Number (with integer) 6649284.0 Ops/sec
Unary + (with integer) 9649725.0 Ops/sec
parseInt (with integer) 6691829.0 Ops/sec
Number (with float) 9801152.0 Ops/sec
Unary + (with float) 18321440.0 Ops/sec
parseInt (with float) 4827652.0 Ops/sec
Number (with NaN) 15441610.0 Ops/sec
Unary + (with NaN) 66139740.0 Ops/sec
parseInt (with NaN) 19064690.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)