Test loop

Benchmark created on


Setup

const arr = Array.from({ length: 1000}, (v, i) => i + 1)

Test runner

Ready to run.

Testing in
TestOps/sec
Map
newArr = arr.map(elem => elem)
ready
For of
const newArr = [];

for(const elem of arr) {
	newArr.push(elem)
}
ready

Revisions

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