Object vs Map Mutation (v2)

Revision 2 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Plain object creation
const obj = {};
for (let i = 0; i< 100_000; i++) {
	obj[String(i)] = i;
}
ready
Map creation
const map = new Map();
for (let i = 0; i< 100_000; i++) {
	map.set(String(i), i);
}
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.