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
parseInt (with NaN)
167.3M/s
Unary + (with NaN)
163.6M/s
Number (with NaN)
161.4M/s
Unary + (with integer)
99.8M/s
Number (with integer)
96.5M/s
Number (with float)
95.7M/s
Unary + (with float)
92.9M/s
parseInt (with integer)
83.7M/s
parseInt (with float)
73.7M/s
parseInt (with string integer)
66.3M/s
Unary + (with string integer)
65.3M/s
Number (with string integer)
62.8M/s
parseInt (with string float)
8.8M/s
Unary + (with string float)
8.2M/s
Number (with string float)
8.1M/s
View exact numbers
Test name Executions per second
parseInt (with NaN) 167,328,080 Ops/sec
Unary + (with NaN) 163,644,784 Ops/sec
Number (with NaN) 161,439,440 Ops/sec
Unary + (with integer) 99,832,136 Ops/sec
Number (with integer) 96,539,968 Ops/sec
Number (with float) 95,702,048 Ops/sec
Unary + (with float) 92,928,128 Ops/sec
parseInt (with integer) 83,664,560 Ops/sec
parseInt (with float) 73,734,416 Ops/sec
parseInt (with string integer) 66,295,688 Ops/sec
Unary + (with string integer) 65,304,000 Ops/sec
Number (with string integer) 62,836,328 Ops/sec
parseInt (with string float) 8,790,988 Ops/sec
Unary + (with string float) 8,178,986 Ops/sec
Number (with string float) 8,085,738 Ops/sec
Tests: