Map from iterable vs loop Map.set

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
From iterable
new Map((function*(){
	for (let i=0; i<1000; i++) 
		yield [i, i]
})())
ready
Loop
map = new Map(); 
for (let i=0; i<1000; i++)
	map.set(i, i);
ready

Revisions

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