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) 15408722.0 Ops/sec
Unary + (with string integer) 28393816.0 Ops/sec
parseInt (with string integer) 16777988.0 Ops/sec
Number (with string float) 3227645.0 Ops/sec
Unary + (with string float) 3477347.0 Ops/sec
parseInt (with string float) 4251235.5 Ops/sec
Number (with integer) 49667860.0 Ops/sec
Unary + (with integer) 922921792.0 Ops/sec
parseInt (with integer) 48965772.0 Ops/sec
Number (with float) 53104192.0 Ops/sec
Unary + (with float) 997542784.0 Ops/sec
parseInt (with float) 43470736.0 Ops/sec
Number (with NaN) 23818074.0 Ops/sec
Unary + (with NaN) 1208875776.0 Ops/sec
parseInt (with NaN) 36330564.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)