array vs set

Benchmark created on


Setup

const array = ['a', 'b', 'c', 'd']
const set = new Set(array)

Test runner

Ready to run.

Testing in
TestOps/sec
array.includes
array.includes('d')
ready
set.has
set.has('d')
ready

Revisions

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