Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Symbol in obj vs obj instanceof constructor 2
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0
Browser:
Firefox 131
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
Symbol in obj
65K/s
obj instanceof constructor
9K/s
View exact numbers
Test name
Executions per second
✓
Symbol in obj
65,091 Ops/sec
obj instanceof constructor
9,156 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
obj instanceof constructor
for (let i = 30000; --i;) obj instanceof test