Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
Chrome 123
Mac OS X 10.15.7
Desktop
2 years ago
Unary + (with NaN)
177.1M/s
Number (with NaN)
18.5M/s
parseInt (with NaN)
18.2M/s
Unary + (with float)
17.0M/s
Number (with float)
9.2M/s
Unary + (with integer)
9.2M/s
parseInt (with float)
8.9M/s
Unary + (with string integer)
8.8M/s
Number (with integer)
6.3M/s
parseInt (with integer)
6.2M/s
parseInt (with string integer)
6.1M/s
Number (with string integer)
6.1M/s
Unary + (with string float)
5.0M/s
parseInt (with string float)
4.6M/s
Number (with string float)
4.0M/s
View exact numbers
Test name Executions per second
Unary + (with NaN) 177,120,864 Ops/sec
Number (with NaN) 18,472,040 Ops/sec
parseInt (with NaN) 18,233,342 Ops/sec
Unary + (with float) 16,971,142 Ops/sec
Number (with float) 9,237,774 Ops/sec
Unary + (with integer) 9,205,017 Ops/sec
parseInt (with float) 8,878,474 Ops/sec
Unary + (with string integer) 8,787,310 Ops/sec
Number (with integer) 6,293,826 Ops/sec
parseInt (with integer) 6,216,196 Ops/sec
parseInt (with string integer) 6,107,260 Ops/sec
Number (with string integer) 6,082,758 Ops/sec
Unary + (with string float) 4,976,021 Ops/sec
parseInt (with string float) 4,636,587 Ops/sec
Number (with string float) 3,982,962 Ops/sec
Tests: