dispatch status test

Benchmark created on


Setup

const size = 10000;
const data = Array.from({ length: size }, (_, i) => ({
  customer: { id: `id${i}` },
  dispatchStatus: 'pending'
}));

Test runner

Ready to run.

Testing in
TestOps/sec
map
	const map = new Map(data.map(d => [d.customer.id, d]));
map.get('id5000');
ready
obj
const obj = Object.fromEntries(data.map(d => [d.customer.id, d]));
obj['id5000'];
ready
arr
const arr = [...data];
arr.find(d => d.customer.id === 'id5000');
ready

Revisions

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