array.from vs map.entries (v3)

Revision 3 of this benchmark created on


Setup

const map = new Map();
[...Array(1000).keys()].forEach(i => map.set(i, i));

Test runner

Ready to run.

Testing in
TestOps/sec
Array.from
const result = Array.from(map)
ready
spread Map.entries
const result = [...map.entries()]
ready
Array.from Map.entries
const result = Array.from(map.entries())
ready
Map.entries
const result = map.entries()
ready

Revisions

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