uint8array set (v2)

Revision 2 of this benchmark created on


Setup

const buf1 = new ArrayBuffer(1000);
const bufView1 = new Uint8Array(buf1);

const buf2 = new ArrayBuffer(500);
const bufView2 = new Uint8Array(buf2);

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; i++) {
	bufView1[i + offset] = bufView2[i];
}

ready

Revisions

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