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
Go 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
Symbol in obj
92/s
obj instanceof constructor
91/s
View exact numbers
Test name
Executions per second
✓
Symbol in obj
92 Ops/sec
obj instanceof constructor
91 Ops/sec
Related benchmarks
InstanceOf vs String type
Instanceof vs string comparison vs property checking vs constructor comparison
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?