JavaScript 1.8.5 (ECMAScript 5) adds some interesting methods that prevent future modifications of a passed object, with varying degrees of thoroughness:
<
In theory freezing an object allows you to make stronger guarantees about the shape of an object.
This means the VM can compact the memory size.
It means the VM can optimize property lookups in the prototype chain.
It means any live references just became not live because the object cannot change anymore.
In practice JavaScript engines do not make these aggressive optimization yet.