Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
Chrome 122
Windows
Desktop
2 years ago
Unary + (with NaN)
44.1M/s
parseInt (with NaN)
3.8M/s
Number (with NaN)
3.6M/s
Unary + (with float)
3.2M/s
Unary + (with integer)
1.8M/s
Unary + (with string integer)
1.7M/s
Number (with float)
1.7M/s
parseInt (with float)
1.7M/s
Number (with integer)
1.3M/s
Number (with string integer)
1.2M/s
parseInt (with integer)
1.2M/s
parseInt (with string integer)
1.2M/s
Unary + (with string float)
987K/s
parseInt (with string float)
898K/s
Number (with string float)
773K/s
View exact numbers
Test name Executions per second
Unary + (with NaN) 44,112,748 Ops/sec
parseInt (with NaN) 3,848,805 Ops/sec
Number (with NaN) 3,642,809 Ops/sec
Unary + (with float) 3,203,687 Ops/sec
Unary + (with integer) 1,772,465 Ops/sec
Unary + (with string integer) 1,730,642 Ops/sec
Number (with float) 1,729,817 Ops/sec
parseInt (with float) 1,665,004 Ops/sec
Number (with integer) 1,268,492 Ops/sec
Number (with string integer) 1,193,836 Ops/sec
parseInt (with integer) 1,185,470 Ops/sec
parseInt (with string integer) 1,167,552 Ops/sec
Unary + (with string float) 986,506 Ops/sec
parseInt (with string float) 898,257 Ops/sec
Number (with string float) 772,786 Ops/sec
Tests: