Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Chrome 121
Linux
Desktop
2 years ago
Unary + (with NaN)
261.0M/s
Number (with NaN)
24.6M/s
parseInt (with NaN)
23.9M/s
Unary + (with float)
22.9M/s
Number (with float)
12.1M/s
Unary + (with integer)
12.1M/s
parseInt (with float)
11.7M/s
Unary + (with string integer)
11.3M/s
parseInt (with integer)
8.2M/s
Number (with integer)
8.1M/s
parseInt (with string integer)
7.9M/s
Number (with string integer)
7.8M/s
Unary + (with string float)
6.0M/s
parseInt (with string float)
5.7M/s
Number (with string float)
4.9M/s
View exact numbers
Test name Executions per second
Unary + (with NaN) 261,015,344 Ops/sec
Number (with NaN) 24,614,624 Ops/sec
parseInt (with NaN) 23,948,368 Ops/sec
Unary + (with float) 22,854,592 Ops/sec
Number (with float) 12,122,711 Ops/sec
Unary + (with integer) 12,083,534 Ops/sec
parseInt (with float) 11,678,414 Ops/sec
Unary + (with string integer) 11,300,315 Ops/sec
parseInt (with integer) 8,245,798 Ops/sec
Number (with integer) 8,121,842 Ops/sec
parseInt (with string integer) 7,854,801 Ops/sec
Number (with string integer) 7,839,752 Ops/sec
Unary + (with string float) 6,019,896 Ops/sec
parseInt (with string float) 5,673,597 Ops/sec
Number (with string float) 4,875,616 Ops/sec
Tests: