| Test case name | Result |
|---|---|
| typeof -> string | |
| Object.prototype.toString.call -> string | |
| typeof -> boolean | |
| Object.prototype.toString.call -> boolean | |
| typeof -> object | |
| Object.prototype.toString.call -> object | |
| typeof -> function | |
| Object.prototype.toString.call -> function |
| Test name | Executions per second |
|---|---|
| typeof -> string | 27567416.0 Ops/sec |
| Object.prototype.toString.call -> string | 3991418.0 Ops/sec |
| typeof -> boolean | 15027905.0 Ops/sec |
| Object.prototype.toString.call -> boolean | 4075635.5 Ops/sec |
| typeof -> object | 12846283.0 Ops/sec |
| Object.prototype.toString.call -> object | 3999299.0 Ops/sec |
| typeof -> function | 24192610.0 Ops/sec |
| Object.prototype.toString.call -> function | 4457707.0 Ops/sec |