Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Object.freeze vs Object.seal (property access)
(version: 0)
Comparing performance of:
normal vs freeze vs seal
Created:
one year ago
by:
Guest
Jump to the latest result
Script Preparation code:
const normal = { x: 0, y: 0 }; const freeze = Object.freeze({ x: 0, y: 0 }); const seal = Object.seal({ x: 0, y: 0 });
Tests:
normal
if (normal.x + normal.y) throw new Error("Wrong")
freeze
if (freeze.x + freeze.y) throw new Error("Wrong")
seal
if (seal.x + seal.y) throw new Error("Wrong")
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
normal
freeze
seal
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Comments
Confirm delete:
Do you really want to delete benchmark?