Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Symbol in obj vs obj instanceof constructor 2
(version: 1)
Comparing performance of:
Symbol in obj vs obj instanceof constructor
Created:
one year ago
by:
Guest
Jump to the latest result
Script Preparation code:
let Sym = Symbol("test") class test { [Sym] } let obj = new test
Tests:
Symbol in obj
for (let i = 30000; --i;) Sym in obj
obj instanceof constructor
for (let i = 30000; --i;) obj instanceof test
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Symbol in obj
obj instanceof constructor
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Mobile Safari/537.36
Browser/OS:
Chrome Mobile 131 on Android
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Symbol in obj
91.6 Ops/sec
obj instanceof constructor
91.3 Ops/sec
Related benchmarks:
instanceof vs type
InstanceOf vs String type
Instanceof vs string comparison vs property checking vs constructor comparison
InstanceOf vs String type 2
InstanceOf vs flag
instanceof vs property in
instanceof vs in
Object.create vs constructor
Symbol in obj vs obj instanceof constructor
Comments
Confirm delete:
Do you really want to delete benchmark?