Test

Benchmark created on


Setup

const data = [...Array(50000).keys()]
const setData = new Set(data);
const mapData = new Map(data.map((obj, i) => [i, obj]));
const obj = Object.assign({}, data);

Test runner

Ready to run.

Testing in
TestOps/sec
1
obj[50000]
ready
2
data.find(x => x == 50000)
ready
3
setData.has(50000)
ready
4
mapData.get(50000)
ready

Revisions

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