Test case name | Result |
---|---|
Number (with string integer) | |
Unary + (with string integer) | |
parseInt (with string integer) | |
Number (with string float) | |
Unary + (with string float) | |
parseInt (with string float) | |
Number (with integer) | |
Unary + (with integer) | |
parseInt (with integer) | |
Number (with float) | |
Unary + (with float) | |
parseInt (with float) | |
Number (with NaN) | |
Unary + (with NaN) | |
parseInt (with NaN) |
Test name | Executions per second |
---|---|
Number (with string integer) | 3664614.0 Ops/sec |
Unary + (with string integer) | 5145685.0 Ops/sec |
parseInt (with string integer) | 3642761.5 Ops/sec |
Number (with string float) | 2474587.5 Ops/sec |
Unary + (with string float) | 3126319.0 Ops/sec |
parseInt (with string float) | 2549427.0 Ops/sec |
Number (with integer) | 3973418.8 Ops/sec |
Unary + (with integer) | 5831906.5 Ops/sec |
parseInt (with integer) | 3754734.8 Ops/sec |
Number (with float) | 5604960.5 Ops/sec |
Unary + (with float) | 10376790.0 Ops/sec |
parseInt (with float) | 5385101.5 Ops/sec |
Number (with NaN) | 11171146.0 Ops/sec |
Unary + (with NaN) | 115805384.0 Ops/sec |
parseInt (with NaN) | 11301867.0 Ops/sec |