Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
in vs Object.hasOwn vs Object.prototype.hasOwnProperty
(version: 0)
Comparing performance of:
in vs Object.hasOwn vs Object.prototype.hasOwnProperty
Created:
one year ago
by:
Guest
Jump to the latest result
Script Preparation code:
var obj = { a: 1, b: 2, c: 3, d: 4, e: 5 };
Tests:
in
'c' in obj
Object.hasOwn
Object.hasOwn(obj, 'c')
Object.prototype.hasOwnProperty
obj.hasOwnProperty('c')
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
in
Object.hasOwn
Object.prototype.hasOwnProperty
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
9 months ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36
Browser/OS:
Chrome 138 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
in
95197144.0 Ops/sec
Object.hasOwn
48965920.0 Ops/sec
Object.prototype.hasOwnProperty
53286856.0 Ops/sec
Related benchmarks:
undefined vs. typeof vs. in vs. hasOwnProperty 2
undefined vs. typeof vs. in vs. Object.prototype.hasOwnProperty
in vs. hasOwnProperty
in vs hasOwn
Comments
Confirm delete:
Do you really want to delete benchmark?