uint8array set

Benchmark created on


Setup

const buf1 = new ArrayBuffer(2000);
const bufView1 = new Uint8Array(buf);

const buf2 = new ArrayBuffer(1000);
const bufView2 = new Uint8Array(buf);

Test runner

Ready to run.

Testing in
TestOps/sec
set
bufView1.set(bufView2, 100);
ready
for loop
const offset = 100;

for (let i = 0; i < bufView2.length - offset; i++) {
	bufView1[i] = bufView2[i + offset];
}

ready

Revisions

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