Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Object vs Se4t
(version: 0)
Comparing performance of:
Object vs Set.add vs Set.set
Created:
2 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
const obj = {}; const set = new Set();
Tests:
Object
for (let i = 0; i < 100000; i++) { obj[i] = true; }
Set.add
for (let i = 0; i < 100000; i++) { set.add(i); }
Set.set
for (let i = 0; i < 100000; i++) { set.set(i, i); }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
Object
Set.add
Set.set
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Comments
Confirm delete:
Do you really want to delete benchmark?