Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36
Chrome 118
Linux
Desktop
2 years ago
Unary + (with NaN)
844.9M/s
parseInt (with NaN)
9.2M/s
Number (with NaN)
8.7M/s
Unary + (with float)
8.6M/s
Number (with float)
4.5M/s
Unary + (with integer)
4.5M/s
parseInt (with float)
4.0M/s
Unary + (with string integer)
4.0M/s
Number (with integer)
3.0M/s
parseInt (with integer)
3.0M/s
parseInt (with string integer)
2.7M/s
Number (with string integer)
2.7M/s
Unary + (with string float)
2.3M/s
parseInt (with string float)
2.2M/s
Number (with string float)
1.7M/s
View exact numbers
Test name Executions per second
Unary + (with NaN) 844,908,736 Ops/sec
parseInt (with NaN) 9,154,039 Ops/sec
Number (with NaN) 8,723,734 Ops/sec
Unary + (with float) 8,568,664 Ops/sec
Number (with float) 4,459,806 Ops/sec
Unary + (with integer) 4,455,656 Ops/sec
parseInt (with float) 4,039,367 Ops/sec
Unary + (with string integer) 3,959,345 Ops/sec
Number (with integer) 3,000,171 Ops/sec
parseInt (with integer) 2,973,418 Ops/sec
parseInt (with string integer) 2,700,141 Ops/sec
Number (with string integer) 2,689,554 Ops/sec
Unary + (with string float) 2,315,956 Ops/sec
parseInt (with string float) 2,194,452 Ops/sec
Number (with string float) 1,711,632 Ops/sec
Tests: