Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
Chrome 119
Windows
Desktop
2 years ago
Unary + (with NaN)
963.4M/s
Number (with NaN)
10.0M/s
parseInt (with NaN)
9.9M/s
Unary + (with float)
8.8M/s
Number (with float)
4.8M/s
Unary + (with integer)
4.4M/s
parseInt (with float)
4.4M/s
Unary + (with string integer)
3.9M/s
parseInt (with integer)
3.2M/s
Number (with integer)
3.1M/s
parseInt (with string integer)
2.7M/s
Number (with string integer)
2.6M/s
Unary + (with string float)
2.2M/s
parseInt (with string float)
2.0M/s
Number (with string float)
1.6M/s
View exact numbers
Test name Executions per second
Unary + (with NaN) 963,404,096 Ops/sec
Number (with NaN) 9,967,594 Ops/sec
parseInt (with NaN) 9,948,673 Ops/sec
Unary + (with float) 8,822,869 Ops/sec
Number (with float) 4,806,104 Ops/sec
Unary + (with integer) 4,412,930 Ops/sec
parseInt (with float) 4,392,804 Ops/sec
Unary + (with string integer) 3,924,730 Ops/sec
parseInt (with integer) 3,212,588 Ops/sec
Number (with integer) 3,100,938 Ops/sec
parseInt (with string integer) 2,656,766 Ops/sec
Number (with string integer) 2,627,557 Ops/sec
Unary + (with string float) 2,181,838 Ops/sec
parseInt (with string float) 1,974,157 Ops/sec
Number (with string float) 1,602,111 Ops/sec
Tests: