Object.hasOwn vs obj.hasOwnProperty

Benchmark created on


Setup

const o = {
	'n': 123
}
const m = []

Test runner

Ready to run.

Testing in
TestOps/sec
Object.hasOwn
m.push(Object.hasOwn(o, 'n'))
ready
obj.hasOwnProperty
m.push(o.hasOwnProperty('n'))
ready

Revisions

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