Iterable spread syntax vs Array.from() (Maps) (v2)

Revision 2 of this benchmark created on


Setup

const m = new Map();
for (const letter of 'abcdefghijklmnopqrstuvwxyz') {
	m.set(letter, Math.random().toString());
}

Teardown

m.clear()

Test runner

Ready to run.

Testing in
TestOps/sec
Iterable spread syntax
const a = [...m.entries()];
ready
Array.from()
const a = Array.from(m.entries());
ready

Revisions

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