bet find in an array

Benchmark created on


Setup

const data = new Array(Math.pow(2, 32) - 1).keys();
const data1 = data;

Test runner

Ready to run.

Testing in
TestOps/sec
find
data.find((e) => e === 
2147483646);
ready
shift
let cur = 0;
while(undefined !== (cur = data1.shift())) {
	if (cur === 2147483646) break;
}
ready

Revisions

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