Test case name | Result |
---|---|
instanceof | |
typeof | |
typeof no function | |
Object.prototype.toString.call | |
Object.prototype.toString.call reverse | |
constructor | |
costructor reverse | |
costructor ?. | |
constructor.name ?. | |
constructor.name ?. reverse |
Test name | Executions per second |
---|---|
instanceof | 4321555.5 Ops/sec |
typeof | 10109686.0 Ops/sec |
typeof no function | 5235010.5 Ops/sec |
Object.prototype.toString.call | 3331079.8 Ops/sec |
Object.prototype.toString.call reverse | 3330641.5 Ops/sec |
constructor | 2688801.2 Ops/sec |
costructor reverse | 2693772.2 Ops/sec |
costructor ?. | 3548908.8 Ops/sec |
constructor.name ?. | 7517079.5 Ops/sec |
constructor.name ?. reverse | 7922247.5 Ops/sec |