Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15
Safari 17
Mac OS X 10.15.7
Desktop
one year ago
Unary + (with NaN)
469.3M/s
Unary + (with float)
17.6M/s
parseInt (with NaN)
17.6M/s
Number (with NaN)
16.9M/s
Unary + (with integer)
9.6M/s
parseInt (with float)
9.4M/s
Unary + (with string float)
7.9M/s
Number (with float)
7.3M/s
parseInt (with integer)
6.4M/s
Number (with integer)
6.4M/s
parseInt (with string float)
5.8M/s
Number (with string float)
5.7M/s
parseInt (with string integer)
5.6M/s
Number (with string integer)
5.5M/s
Unary + (with string integer)
4.1M/s
View exact numbers
Test name Executions per second
Unary + (with NaN) 469,318,592 Ops/sec
Unary + (with float) 17,624,038 Ops/sec
parseInt (with NaN) 17,598,678 Ops/sec
Number (with NaN) 16,902,120 Ops/sec
Unary + (with integer) 9,559,237 Ops/sec
parseInt (with float) 9,412,235 Ops/sec
Unary + (with string float) 7,893,255 Ops/sec
Number (with float) 7,310,432 Ops/sec
parseInt (with integer) 6,412,734 Ops/sec
Number (with integer) 6,371,984 Ops/sec
parseInt (with string float) 5,771,878 Ops/sec
Number (with string float) 5,653,516 Ops/sec
parseInt (with string integer) 5,569,950 Ops/sec
Number (with string integer) 5,452,150 Ops/sec
Unary + (with string integer) 4,129,738 Ops/sec
Tests: