Complexidade concatenação de arrays

Benchmark created on


Setup

const items1 = Array.from(Array(50000).keys());
const items2 = Array.from(Array(50000).keys());

Test runner

Ready to run.

Testing in
TestOps/sec
Desestruturação
const completo = [...items1, ...items2];
ready
com o concat
const completo = items1.concat(items2);
ready

Revisions

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