Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Object.freeze vs Object.seal (only property access)
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Browser:
Chrome 127
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
normal
7646345.0 Ops/sec
freeze
7714775.5 Ops/sec
seal
7664697.0 Ops/sec
Script Preparation code:
var normal = { x: 0, y: 0 }; var freeze = Object.freeze({ x: 0, y: 0 }); var 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")