Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36 Edg/133.0.0.0
Chrome 133
Mac OS X 10.15.7
Desktop
one year ago
Number (with NaN)
144.5M/s
parseInt (with NaN)
137.7M/s
Unary + (with NaN)
137.5M/s
Number (with float)
95.7M/s
Number (with integer)
93.5M/s
Unary + (with float)
93.5M/s
Unary + (with integer)
92.4M/s
parseInt (with float)
70.4M/s
parseInt (with integer)
70.4M/s
Number (with string integer)
57.9M/s
parseInt (with string integer)
57.7M/s
Unary + (with string integer)
56.6M/s
parseInt (with string float)
9.0M/s
Unary + (with string float)
8.5M/s
Number (with string float)
8.3M/s
View exact numbers
Test name Executions per second
Number (with NaN) 144,508,320 Ops/sec
parseInt (with NaN) 137,669,792 Ops/sec
Unary + (with NaN) 137,452,464 Ops/sec
Number (with float) 95,672,576 Ops/sec
Number (with integer) 93,531,064 Ops/sec
Unary + (with float) 93,497,696 Ops/sec
Unary + (with integer) 92,357,552 Ops/sec
parseInt (with float) 70,405,984 Ops/sec
parseInt (with integer) 70,377,416 Ops/sec
Number (with string integer) 57,876,340 Ops/sec
parseInt (with string integer) 57,659,588 Ops/sec
Unary + (with string integer) 56,614,180 Ops/sec
parseInt (with string float) 8,956,869 Ops/sec
Unary + (with string float) 8,521,725 Ops/sec
Number (with string float) 8,329,798 Ops/sec
Tests: