Destructure from Object.seal vs Object.freeze vs normal
Date tested:
2 years ago
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36
Test name
Executions per second
seal
9907711.0 Ops/sec
normal
9905547.0 Ops/sec
freeze
9874813.0 Ops/sec
Benchmark definition (click to collapse):
Script Preparation code:
var a = Object.seal( {x: 321, y: 123} ); var b = {x: 321, y: 123} var c = Object.freeze( {x: 321, y: 123} );
Tests:
seal
const {x,y} = a
normal
const {x,y} = b
freeze
const {x,y} = c
Open this result on MeasureThat.net