Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
Chrome 124
Linux
Desktop
2 years ago
Unary + (with NaN)
133.5M/s
parseInt (with NaN)
9.6M/s
Number (with NaN)
9.2M/s
Unary + (with float)
9.2M/s
Number (with float)
4.9M/s
Unary + (with integer)
4.9M/s
parseInt (with float)
4.7M/s
Unary + (with string integer)
4.2M/s
parseInt (with integer)
3.4M/s
Number (with integer)
3.4M/s
parseInt (with string integer)
3.3M/s
Number (with string integer)
3.2M/s
parseInt (with string float)
2.2M/s
Unary + (with string float)
2.1M/s
Number (with string float)
1.8M/s
View exact numbers
Test name Executions per second
Unary + (with NaN) 133,466,608 Ops/sec
parseInt (with NaN) 9,577,154 Ops/sec
Number (with NaN) 9,181,364 Ops/sec
Unary + (with float) 9,179,648 Ops/sec
Number (with float) 4,920,652 Ops/sec
Unary + (with integer) 4,878,483 Ops/sec
parseInt (with float) 4,652,590 Ops/sec
Unary + (with string integer) 4,170,423 Ops/sec
parseInt (with integer) 3,406,102 Ops/sec
Number (with integer) 3,378,666 Ops/sec
parseInt (with string integer) 3,270,821 Ops/sec
Number (with string integer) 3,231,286 Ops/sec
parseInt (with string float) 2,150,533 Ops/sec
Unary + (with string float) 2,088,617 Ops/sec
Number (with string float) 1,791,099 Ops/sec
Tests: