test

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
test1
const loop = ['one','two','three','four'];
const find = 'three';

const result = loop.find(value=>value === find);
ready
test2
const loop = ['one','two','three','four'];
const find = 'three';

let result;
for(let i = 0; i < loop.length; i++) {
	if(loop[i] === find){
		result = loop[i];
	}
}
ready

Revisions

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