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 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Browser:
Chrome 131
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Symbol in obj
49.6 Ops/sec
obj instanceof constructor
50.8 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}