set/arr/obj

Benchmark created on


Setup

const itemsArr = ['a','b','c']
const itemsSet = new Set(itemsArr)
const itemsObj = {a:true, b:true, c:true}

Test runner

Ready to run.

Testing in
TestOps/sec
arr
itemsArr.includes('c');
ready
set
itemsSet.has('c');
ready
obj
itemsObj['c'] != null
ready

Revisions

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