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
one year ago
Unary + (with NaN)
165.5M/s
Number (with NaN)
14.9M/s
parseInt (with NaN)
14.8M/s
Unary + (with float)
14.0M/s
Number (with float)
7.5M/s
Unary + (with integer)
7.5M/s
parseInt (with float)
7.3M/s
Unary + (with string integer)
7.2M/s
Number (with integer)
5.1M/s
parseInt (with integer)
5.1M/s
parseInt (with string integer)
5.0M/s
Number (with string integer)
5.0M/s
Unary + (with string float)
4.3M/s
parseInt (with string float)
4.1M/s
Number (with string float)
3.4M/s
View exact numbers
Test name Executions per second
Unary + (with NaN) 165,524,832 Ops/sec
Number (with NaN) 14,919,694 Ops/sec
parseInt (with NaN) 14,786,940 Ops/sec
Unary + (with float) 13,998,507 Ops/sec
Number (with float) 7,537,500 Ops/sec
Unary + (with integer) 7,515,853 Ops/sec
parseInt (with float) 7,310,546 Ops/sec
Unary + (with string integer) 7,231,182 Ops/sec
Number (with integer) 5,131,972 Ops/sec
parseInt (with integer) 5,101,390 Ops/sec
parseInt (with string integer) 5,011,332 Ops/sec
Number (with string integer) 4,971,752 Ops/sec
Unary + (with string float) 4,284,784 Ops/sec
parseInt (with string float) 4,057,670 Ops/sec
Number (with string float) 3,389,490 Ops/sec
Tests: