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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36
Browser:
Chrome 140
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
7 months ago
Test name
Executions per second
normal
1017062.4 Ops/sec
seal
1014372.2 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; }