Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0
Firefox 98
Ubuntu
Desktop
2 years ago
Test name Executions per second
Number (with string integer) 15702564.0 Ops/sec
Unary + (with string integer) 31851688.0 Ops/sec
parseInt (with string integer) 17834626.0 Ops/sec
Number (with string float) 2368161.2 Ops/sec
Unary + (with string float) 2459958.5 Ops/sec
parseInt (with string float) 4456437.5 Ops/sec
Number (with integer) 47454168.0 Ops/sec
Unary + (with integer) 1185195008.0 Ops/sec
parseInt (with integer) 47792300.0 Ops/sec
Number (with float) 51047088.0 Ops/sec
Unary + (with float) 1617298304.0 Ops/sec
parseInt (with float) 42157984.0 Ops/sec
Number (with NaN) 25356774.0 Ops/sec
Unary + (with NaN) 1554607488.0 Ops/sec
parseInt (with NaN) 38820460.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)