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)
244.7M/s
Number (with NaN)
20.1M/s
parseInt (with NaN)
20.0M/s
Unary + (with float)
18.8M/s
Unary + (with integer)
10.1M/s
Number (with float)
10.1M/s
parseInt (with float)
9.9M/s
Unary + (with string integer)
9.7M/s
Number (with integer)
6.9M/s
parseInt (with integer)
6.8M/s
parseInt (with string integer)
6.7M/s
Number (with string integer)
6.6M/s
Unary + (with string float)
5.6M/s
parseInt (with string float)
5.1M/s
Number (with string float)
4.5M/s
View exact numbers
Test name Executions per second
Unary + (with NaN) 244,717,888 Ops/sec
Number (with NaN) 20,129,788 Ops/sec
parseInt (with NaN) 20,048,450 Ops/sec
Unary + (with float) 18,750,108 Ops/sec
Unary + (with integer) 10,128,567 Ops/sec
Number (with float) 10,101,317 Ops/sec
parseInt (with float) 9,872,110 Ops/sec
Unary + (with string integer) 9,667,126 Ops/sec
Number (with integer) 6,921,190 Ops/sec
parseInt (with integer) 6,820,458 Ops/sec
parseInt (with string integer) 6,720,947 Ops/sec
Number (with string integer) 6,643,104 Ops/sec
Unary + (with string float) 5,637,646 Ops/sec
parseInt (with string float) 5,142,293 Ops/sec
Number (with string float) 4,479,214 Ops/sec
Tests: