Every vs Find

Benchmark created on


Setup

const ids = ['a', 'b', 'c', 'd', 'e'];
const detailId = 'c';

Test runner

Ready to run.

Testing in
TestOps/sec
Every
const isOrphan = ids.every((id) => id === detailId) == null;
ready
Find
const isOrphan = ids.find((id) => id === detailId) == null;
ready

Revisions

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