Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
normal object vs mutated object
(version: 1)
Comparing performance of:
normal object vs mutated
Created:
one year ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
'use strict'; class a {a=3;b(){blur()}} class b {a=3;b(){blur()}} let obj1 = new a let obj2 = new a Reflect.setPrototypeOf(obj2, b.prototype)
Tests:
normal object
obj1.a = 2 obj1.a delete obj1.a obj1.b() 'a'in obj1 Object.defineProperty(obj1,'a',{value:2})
mutated
obj2.a = 2 obj2.a delete obj2.a obj2.b() 'a'in obj2 Object.defineProperty(obj2,'a',{value:2})
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
normal object
mutated
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Browser/OS:
Chrome 133 on Linux
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
normal object
3372198.5 Ops/sec
mutated
3417933.8 Ops/sec
Related benchmarks:
defineproperty vs direct assignment
HasOwnProperty vs classical if
Object defineProperty on class
Object assign vs Property change
Delete vs set undefined Properties
in vs hasOwnProperty
setPrototypeOf vs getPrototypeOf
Test JS getter/setter
new EmptyClass VS Object.create(EmptyClass)
Comments
Confirm delete:
Do you really want to delete benchmark?