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)
166.8M/s
Number (with NaN)
14.8M/s
Unary + (with float)
13.8M/s
parseInt (with NaN)
12.5M/s
Number (with float)
7.5M/s
Unary + (with integer)
7.4M/s
parseInt (with float)
7.4M/s
Unary + (with string integer)
7.2M/s
parseInt (with integer)
5.1M/s
Number (with integer)
5.1M/s
parseInt (with string integer)
5.0M/s
Number (with string integer)
5.0M/s
Unary + (with string float)
4.2M/s
parseInt (with string float)
4.0M/s
Number (with string float)
3.3M/s
View exact numbers
Test name Executions per second
Unary + (with NaN) 166,833,008 Ops/sec
Number (with NaN) 14,845,792 Ops/sec
Unary + (with float) 13,772,382 Ops/sec
parseInt (with NaN) 12,521,552 Ops/sec
Number (with float) 7,503,051 Ops/sec
Unary + (with integer) 7,427,682 Ops/sec
parseInt (with float) 7,350,200 Ops/sec
Unary + (with string integer) 7,157,208 Ops/sec
parseInt (with integer) 5,077,360 Ops/sec
Number (with integer) 5,052,408 Ops/sec
parseInt (with string integer) 5,028,726 Ops/sec
Number (with string integer) 4,956,952 Ops/sec
Unary + (with string float) 4,175,913 Ops/sec
parseInt (with string float) 3,984,864 Ops/sec
Number (with string float) 3,319,644 Ops/sec
Tests: