Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36
Chrome 92
Mac OS X 10.15.7
Desktop
3 years ago
Test name Executions per second
Number (with string integer) 2333090.2 Ops/sec
Unary + (with string integer) 3508056.8 Ops/sec
parseInt (with string integer) 2413303.5 Ops/sec
Number (with string float) 1539746.1 Ops/sec
Unary + (with string float) 1980488.2 Ops/sec
parseInt (with string float) 1787401.0 Ops/sec
Number (with integer) 2493059.2 Ops/sec
Unary + (with integer) 3645666.8 Ops/sec
parseInt (with integer) 2506796.8 Ops/sec
Number (with float) 3717377.2 Ops/sec
Unary + (with float) 7132118.5 Ops/sec
parseInt (with float) 3553540.5 Ops/sec
Number (with NaN) 7804958.5 Ops/sec
Unary + (with NaN) 928595328.0 Ops/sec
parseInt (with NaN) 5384831.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)


;