loop object (v2)

Revision 2 of this benchmark created on


Setup

const obj = {}
let i = 100
while (i--) {
	obj['key' + i] = i
}

Test runner

Ready to run.

Testing in
TestOps/sec
for ... in loop
for (const key in obj) {
	const res = obj[key] + ''
}
ready
entries loop
for (const [key, val] of Object.entries(obj)) {
	const res = val + ''
}
ready

Revisions

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