Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Object vs Object.seal
JS Javascript Normal Object vs Object.seal performance
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:142.0) Gecko/20100101 Firefox/142.0
Browser:
Firefox 142
Operating system:
Linux
Device Platform:
Desktop
Date tested:
8 months ago
Test name
Executions per second
normal
5148250.5 Ops/sec
seal
5113388.0 Ops/sec
Script Preparation code:
var normal = { x: 1, y: 2, z: 0 }; var seal = Object.seal({ x: 1, y: 2, z: 0 }); var tmp = { x: 0, y: 0, z: 0 }; var k; var v;
Tests:
normal
normal.z = normal.x + normal.y; for (k in normal) { tmp[k] = normal[k]; } for ([k, v] of Object.entries(normal)) { tmp[k] = v; }
seal
seal.z = seal.x + seal.y; for (k in seal) { tmp[k] = seal[k]; } for ([k, v] of Object.entries(seal)) { tmp[k] = v; }