Array.from vs ...

Benchmark created on


Setup

let data = new Set();
for(let i = 0; i<10000; i++){
	data.add("user_" + i);
}

Test runner

Ready to run.

Testing in
TestOps/sec
Array.from
let x = Array.from(data);
ready
...
let x = [...data];
ready

Revisions

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