With entries or without

Benchmark created on


Setup

const dictionary = {};
let count = 0;
for(const i = 0; i < 100000; i++) {
	dictionary[i] = { a: 'test', b: i };
}

Test runner

Ready to run.

Testing in
TestOps/sec
With
Object.entries(dictionary).find(([key]) => key === 12378)
ready
Without
Object.keys(dictionary).find(key => key === 12378)
ready

Revisions

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