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
848K/s
Object.prototype.toString.call -> boolean
336K/s
Object.prototype.toString.call -> string
322K/s
Object.prototype.toString.call -> object
317K/s
Object.prototype.toString.call -> function
308K/s
View exact numbers
| Test name |
Executions per second |
|
✓
typeof -> object
|
905,779 Ops/sec |
|
typeof -> function
|
847,992 Ops/sec |
|
typeof -> boolean
|
821,962 Ops/sec |
|
typeof -> string
|
782,420 Ops/sec |
|
Object.prototype.toString.call -> boolean
|
335,538 Ops/sec |
|
Object.prototype.toString.call -> string
|
321,892 Ops/sec |
|
Object.prototype.toString.call -> object
|
317,402 Ops/sec |
|
Object.prototype.toString.call -> function
|
307,521 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