Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
Chrome 137
Mac OS X 10.15.7
Desktop
one year ago
Number (with NaN)
219.5M/s
Unary + (with float)
134.0M/s
Number (with integer)
132.2M/s
Number (with float)
104.7M/s
parseInt (with float)
103.1M/s
parseInt (with string integer)
86.0M/s
Unary + (with string integer)
84.6M/s
Number (with string integer)
80.5M/s
parseInt (with NaN)
60.6M/s
Unary + (with NaN)
60.0M/s
Unary + (with integer)
46.2M/s
parseInt (with integer)
36.4M/s
parseInt (with string float)
11.5M/s
Unary + (with string float)
10.9M/s
Number (with string float)
10.8M/s
View exact numbers
Test name Executions per second
Number (with NaN) 219,467,760 Ops/sec
Unary + (with float) 133,976,688 Ops/sec
Number (with integer) 132,188,592 Ops/sec
Number (with float) 104,654,040 Ops/sec
parseInt (with float) 103,074,424 Ops/sec
parseInt (with string integer) 85,951,768 Ops/sec
Unary + (with string integer) 84,623,976 Ops/sec
Number (with string integer) 80,467,056 Ops/sec
parseInt (with NaN) 60,623,924 Ops/sec
Unary + (with NaN) 59,961,624 Ops/sec
Unary + (with integer) 46,186,212 Ops/sec
parseInt (with integer) 36,413,292 Ops/sec
parseInt (with string float) 11,500,745 Ops/sec
Unary + (with string float) 10,874,979 Ops/sec
Number (with string float) 10,787,736 Ops/sec
Tests: