Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36
Chrome 134
Mac OS X 10.15.7
Desktop
one year ago
Unary + (with NaN)
191.1M/s
parseInt (with NaN)
182.3M/s
Number (with NaN)
175.4M/s
Unary + (with float)
108.1M/s
Unary + (with integer)
107.7M/s
Number (with integer)
105.9M/s
Number (with float)
104.5M/s
parseInt (with integer)
95.5M/s
parseInt (with float)
81.4M/s
parseInt (with string integer)
71.9M/s
Unary + (with string integer)
71.4M/s
Number (with string integer)
69.0M/s
parseInt (with string float)
10.2M/s
Unary + (with string float)
9.7M/s
Number (with string float)
9.6M/s
View exact numbers
Test name Executions per second
Unary + (with NaN) 191,055,920 Ops/sec
parseInt (with NaN) 182,255,680 Ops/sec
Number (with NaN) 175,403,456 Ops/sec
Unary + (with float) 108,123,280 Ops/sec
Unary + (with integer) 107,708,480 Ops/sec
Number (with integer) 105,851,616 Ops/sec
Number (with float) 104,540,648 Ops/sec
parseInt (with integer) 95,503,744 Ops/sec
parseInt (with float) 81,386,304 Ops/sec
parseInt (with string integer) 71,857,376 Ops/sec
Unary + (with string integer) 71,371,760 Ops/sec
Number (with string integer) 68,985,520 Ops/sec
parseInt (with string float) 10,191,766 Ops/sec
Unary + (with string float) 9,700,726 Ops/sec
Number (with string float) 9,598,690 Ops/sec
Tests: