array.from vs map.entries

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
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.