Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
{} vs Map with set ONLY
(version: 2)
Comparing performance of:
Creation: Object vs Creation: Map
Created:
one year ago
by:
Registered User
Jump to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Tests:
Creation: Object
const d = {}; for (let i = 0; i < 10000; i++) { d[i] = i; }
Creation: Map
const d = new Map(); for (let i = 0; i < 10000; i++) { d.set(i, i); }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Creation: Object
Creation: Map
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:136.0) Gecko/20100101 Firefox/136.0
Browser/OS:
Firefox 136 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Creation: Object
51097.0 Ops/sec
Creation: Map
3517.0 Ops/sec
Related benchmarks:
Map vs Object (get) [2]
Map vs Object creation 3
Map vs Object.create(null)
Map get VS Map has get2
Set replace
map vs object test here
{} vs Map Creation
{} vs Map with set
{} vs Map with set and DELETE
Comments
Confirm delete:
Do you really want to delete benchmark?