Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
Chrome 129
Mac OS X 10.15.7
Desktop
one year ago
Unary + (with NaN)
148.5M/s
Number (with NaN)
15.9M/s
parseInt (with NaN)
15.9M/s
Unary + (with float)
14.9M/s
Number (with float)
8.0M/s
Unary + (with integer)
7.9M/s
parseInt (with float)
7.8M/s
Unary + (with string integer)
7.5M/s
Number (with integer)
5.4M/s
parseInt (with string integer)
5.3M/s
Number (with string integer)
5.3M/s
parseInt (with integer)
5.2M/s
Unary + (with string float)
4.0M/s
parseInt (with string float)
3.4M/s
Number (with string float)
3.2M/s
View exact numbers
Test name Executions per second
Unary + (with NaN) 148,504,224 Ops/sec
Number (with NaN) 15,944,333 Ops/sec
parseInt (with NaN) 15,887,919 Ops/sec
Unary + (with float) 14,895,774 Ops/sec
Number (with float) 7,965,178 Ops/sec
Unary + (with integer) 7,933,422 Ops/sec
parseInt (with float) 7,779,816 Ops/sec
Unary + (with string integer) 7,509,618 Ops/sec
Number (with integer) 5,428,931 Ops/sec
parseInt (with string integer) 5,304,712 Ops/sec
Number (with string integer) 5,266,758 Ops/sec
parseInt (with integer) 5,213,793 Ops/sec
Unary + (with string float) 3,992,365 Ops/sec
parseInt (with string float) 3,365,490 Ops/sec
Number (with string float) 3,185,439 Ops/sec
Tests: