Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
Chrome 129
Windows
Desktop
one year ago
Benchmark.js
typeof -> function
752K/s
Object.prototype.toString.call -> function
360K/s
Object.prototype.toString.call -> boolean
344K/s
Object.prototype.toString.call -> string
312K/s
Object.prototype.toString.call -> object
262K/s
View exact numbers
| Test name |
Executions per second |
|
✓
typeof -> object
|
877,469 Ops/sec |
|
typeof -> boolean
|
856,719 Ops/sec |
|
typeof -> function
|
751,850 Ops/sec |
|
typeof -> string
|
705,186 Ops/sec |
|
Object.prototype.toString.call -> function
|
360,288 Ops/sec |
|
Object.prototype.toString.call -> boolean
|
343,713 Ops/sec |
|
Object.prototype.toString.call -> string
|
312,344 Ops/sec |
|
Object.prototype.toString.call -> object
|
261,716 Ops/sec |
Tests:
-
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