set vs. list: init + membership check (v2)

Revision 2 of this benchmark created on


Setup

const inputArray = [...Array(100).keys()];
const inputSet = new Set(inputArray)

Test runner

Ready to run.

Testing in
TestOps/sec
Array includes only
const result = inputArray.includes(6)
ready
Set has only
const result = inputSet.has(6)
ready

Revisions

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