Includes vs IndexOf

Benchmark created on


Setup

const items = [
	1,2,4,5,6,7,8,10
]

Test runner

Ready to run.

Testing in
TestOps/sec
Includes
items.includes(7);
ready
IndexOf
items.indexOf(7) > -1;
ready

Revisions

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