includes vs some

Benchmark created on


Setup

const arr = Array.from({ length: 100000 }, () => Math.random());
const element = arr[98765];

Test runner

Ready to run.

Testing in
TestOps/sec
includes
arr.includes(element);
ready
some
arr.some(e => e === element);
ready

Revisions

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