some vs find (v2)

Revision 2 of this benchmark created on


Setup

var N = 10000;

var arr = [];
for (var i = 0; i < N; i++) {
  arr.push(i);
}

function isBig(x) {
  return x === N - 10;
}


Test runner

Ready to run.

Testing in
TestOps/sec
Some
arr.some(isBig);
ready
Filter
arr.filter(isBig);
ready
Filter
arr.find(isBig)
ready

Revisions

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