Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Chrome 135
Linux
Desktop
one year ago
Number (with NaN)
140.8M/s
Unary + (with NaN)
137.5M/s
parseInt (with NaN)
137.5M/s
Number (with integer)
86.3M/s
Number (with float)
84.1M/s
Unary + (with float)
83.6M/s
Unary + (with integer)
81.5M/s
parseInt (with integer)
69.5M/s
parseInt (with float)
57.6M/s
parseInt (with string integer)
48.8M/s
Unary + (with string integer)
47.6M/s
Number (with string integer)
46.1M/s
parseInt (with string float)
5.9M/s
Unary + (with string float)
5.4M/s
Number (with string float)
5.2M/s
View exact numbers
Test name Executions per second
Number (with NaN) 140,789,440 Ops/sec
Unary + (with NaN) 137,489,216 Ops/sec
parseInt (with NaN) 137,478,208 Ops/sec
Number (with integer) 86,253,560 Ops/sec
Number (with float) 84,139,832 Ops/sec
Unary + (with float) 83,621,688 Ops/sec
Unary + (with integer) 81,472,896 Ops/sec
parseInt (with integer) 69,472,744 Ops/sec
parseInt (with float) 57,638,984 Ops/sec
parseInt (with string integer) 48,847,128 Ops/sec
Unary + (with string integer) 47,561,096 Ops/sec
Number (with string integer) 46,066,052 Ops/sec
parseInt (with string float) 5,905,913 Ops/sec
Unary + (with string float) 5,442,132 Ops/sec
Number (with string float) 5,155,490 Ops/sec
Tests: