Array building

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
TypedArray
const arr = new Uint16Array(10000);
for (let i = 0; i < 7000; ++i) {
	arr[i] = i;
}
const res = Array.from(arr.subarray(0, 7000));
ready
Array#push
const res = [];
for (let i = 0; i < 7000; ++i) {
	res.push(i);
}
ready

Revisions

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