Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Chrome 120
Windows
Desktop
2 years ago
Unary + (with NaN)
171.2M/s
Number (with NaN)
12.1M/s
parseInt (with NaN)
12.0M/s
Unary + (with float)
10.8M/s
Number (with float)
5.7M/s
Unary + (with integer)
5.6M/s
parseInt (with float)
5.5M/s
Unary + (with string integer)
5.5M/s
Number (with integer)
4.0M/s
Number (with string integer)
3.9M/s
parseInt (with integer)
3.8M/s
parseInt (with string integer)
3.8M/s
Unary + (with string float)
2.8M/s
parseInt (with string float)
2.7M/s
Number (with string float)
2.2M/s
View exact numbers
Test name Executions per second
Unary + (with NaN) 171,185,408 Ops/sec
Number (with NaN) 12,105,302 Ops/sec
parseInt (with NaN) 11,980,994 Ops/sec
Unary + (with float) 10,809,483 Ops/sec
Number (with float) 5,708,926 Ops/sec
Unary + (with integer) 5,633,438 Ops/sec
parseInt (with float) 5,516,094 Ops/sec
Unary + (with string integer) 5,495,844 Ops/sec
Number (with integer) 4,012,650 Ops/sec
Number (with string integer) 3,877,907 Ops/sec
parseInt (with integer) 3,848,774 Ops/sec
parseInt (with string integer) 3,774,478 Ops/sec
Unary + (with string float) 2,833,619 Ops/sec
parseInt (with string float) 2,676,208 Ops/sec
Number (with string float) 2,217,624 Ops/sec
Tests: