Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:103.0) Gecko/20100101 Firefox/103.0
Firefox 103
Mac OS X 10.15
Desktop
2 years ago
Test name Executions per second
Number (with string integer) 15408720.0 Ops/sec
Unary + (with string integer) 28393820.0 Ops/sec
parseInt (with string integer) 16777990.0 Ops/sec
Number (with string float) 3227645.0 Ops/sec
Unary + (with string float) 3477347.0 Ops/sec
parseInt (with string float) 4251236.0 Ops/sec
Number (with integer) 49667860.0 Ops/sec
Unary + (with integer) 922921800.0 Ops/sec
parseInt (with integer) 48965770.0 Ops/sec
Number (with float) 53104190.0 Ops/sec
Unary + (with float) 997542800.0 Ops/sec
parseInt (with float) 43470740.0 Ops/sec
Number (with NaN) 23818070.0 Ops/sec
Unary + (with NaN) 1208876000.0 Ops/sec
parseInt (with NaN) 36330560.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)