Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36
Chrome 90
Linux
Desktop
2 years ago
Test name Executions per second
Number (with string integer) 2385036.2 Ops/sec
Unary + (with string integer) 3464843.0 Ops/sec
parseInt (with string integer) 2095198.0 Ops/sec
Number (with string float) 1101728.9 Ops/sec
Unary + (with string float) 1417129.2 Ops/sec
parseInt (with string float) 1340877.1 Ops/sec
Number (with integer) 2172157.5 Ops/sec
Unary + (with integer) 3121815.5 Ops/sec
parseInt (with integer) 2355905.5 Ops/sec
Number (with float) 3310808.5 Ops/sec
Unary + (with float) 6082285.0 Ops/sec
parseInt (with float) 3705181.5 Ops/sec
Number (with NaN) 8047964.5 Ops/sec
Unary + (with NaN) 627683776.0 Ops/sec
parseInt (with NaN) 5626964.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)


;