Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
Chrome 128
Mac OS X 10.15.7
Desktop
one year ago
Unary + (with NaN)
162.9M/s
parseInt (with NaN)
15.2M/s
Number (with NaN)
15.2M/s
Unary + (with float)
14.1M/s
Unary + (with integer)
7.6M/s
Number (with float)
7.6M/s
parseInt (with float)
7.4M/s
Unary + (with string integer)
6.6M/s
Number (with integer)
5.2M/s
parseInt (with integer)
5.1M/s
Number (with string integer)
5.0M/s
parseInt (with string integer)
4.6M/s
Unary + (with string float)
4.0M/s
parseInt (with string float)
4.0M/s
Number (with string float)
2.3M/s
View exact numbers
Test name Executions per second
Unary + (with NaN) 162,912,544 Ops/sec
parseInt (with NaN) 15,183,397 Ops/sec
Number (with NaN) 15,174,115 Ops/sec
Unary + (with float) 14,144,916 Ops/sec
Unary + (with integer) 7,600,633 Ops/sec
Number (with float) 7,575,813 Ops/sec
parseInt (with float) 7,426,184 Ops/sec
Unary + (with string integer) 6,580,640 Ops/sec
Number (with integer) 5,201,866 Ops/sec
parseInt (with integer) 5,148,097 Ops/sec
Number (with string integer) 4,982,106 Ops/sec
parseInt (with string integer) 4,575,618 Ops/sec
Unary + (with string float) 4,026,022 Ops/sec
parseInt (with string float) 4,008,842 Ops/sec
Number (with string float) 2,339,051 Ops/sec
Tests: