Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Chrome 126
Mac OS X 10.15.7
Desktop
2 years ago
Unary + (with NaN)
178.9M/s
Number (with NaN)
16.0M/s
parseInt (with NaN)
15.9M/s
Unary + (with float)
15.0M/s
Number (with float)
8.1M/s
Unary + (with integer)
8.1M/s
parseInt (with float)
7.9M/s
Unary + (with string integer)
7.7M/s
Number (with integer)
5.6M/s
parseInt (with integer)
5.5M/s
Number (with string integer)
5.4M/s
parseInt (with string integer)
5.4M/s
Unary + (with string float)
4.6M/s
parseInt (with string float)
4.3M/s
Number (with string float)
3.7M/s
View exact numbers
Test name Executions per second
Unary + (with NaN) 178,931,520 Ops/sec
Number (with NaN) 16,048,383 Ops/sec
parseInt (with NaN) 15,858,300 Ops/sec
Unary + (with float) 15,009,348 Ops/sec
Number (with float) 8,132,796 Ops/sec
Unary + (with integer) 8,061,715 Ops/sec
parseInt (with float) 7,894,257 Ops/sec
Unary + (with string integer) 7,733,264 Ops/sec
Number (with integer) 5,609,382 Ops/sec
parseInt (with integer) 5,503,199 Ops/sec
Number (with string integer) 5,449,580 Ops/sec
parseInt (with string integer) 5,381,956 Ops/sec
Unary + (with string float) 4,646,580 Ops/sec
parseInt (with string float) 4,295,602 Ops/sec
Number (with string float) 3,694,467 Ops/sec
Tests: