Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36
Chrome 111
Linux
Desktop
one year ago
Test name Executions per second
Number (with string integer) 3239866.8 Ops/sec
Unary + (with string integer) 4675522.5 Ops/sec
parseInt (with string integer) 3263046.5 Ops/sec
Number (with string float) 2172588.8 Ops/sec
Unary + (with string float) 2844394.8 Ops/sec
parseInt (with string float) 2519273.8 Ops/sec
Number (with integer) 3425669.5 Ops/sec
Unary + (with integer) 5059277.5 Ops/sec
parseInt (with integer) 3386384.2 Ops/sec
Number (with float) 5082516.5 Ops/sec
Unary + (with float) 9745916.0 Ops/sec
parseInt (with float) 4883369.0 Ops/sec
Number (with NaN) 10476078.0 Ops/sec
Unary + (with NaN) 970998720.0 Ops/sec
parseInt (with NaN) 10478098.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)