Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Symbol in obj vs obj instanceof constructor 3
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
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:
Chrome Mobile 131
Operating system:
Android
Device Platform:
Mobile
Date tested:
one year ago
Test name
Executions per second
Symbol in obj
61.1 Ops/sec
obj instanceof constructor
58.5 Ops/sec
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; Sym in []}
obj instanceof constructor
for (let i = 30000; --i;) {obj instanceof test; [] instanceof test}