Are frozen Objects faster ?

Aymeric Vitte vitteaymeric at
Fri Feb 15 07:13:06 PST 2013

Typed Arrays are not frozen on FF, they are not extensible, only new 
typed_array(nothing) is frozen (just bad luck for your example :-) ).

Reading this thread, it seems that I am not using good practices, 
because I am using quite often the object literal indexed with numbers 
(var a={};a[1]=something), and I am using delete to remove the values 
(the object litteral becomes a kind of array with holes), and I really 
expect delete to remove the property, not to assign it to null. I find 
it convenient (despite of the fact that properties enumeration order in 
that case is let to the appreciation of the js engine and can change 
depending on what you are doing), is this not correct/impacting a lot 

One day maybe there could be an annex in ES specs about good practices 
and performances, or does it exist somewhere?


Le 14/02/2013 21:50, Andrea Giammarchi a écrit :
> I wodner how come Firefox behaves like that then but I don't have 
> tests to compare any difference between these two. I will write some, 
> thanks
> On Thu, Feb 14, 2013 at 12:48 PM, Andreas Rossberg 
> <rossberg at <mailto:rossberg at>> wrote:
>     On 14 February 2013 21:36, Andrea Giammarchi
>     <andrea.giammarchi at <mailto:andrea.giammarchi at>>
>     wrote:
>     > "Binary Arrays" are indeed frozen objects, at least in Firefox,
>     and ultra
>     > fast:
>     > Object.isFrozen(new Float32Array()) // true in Firefox
>     >
>     > Since these are ultra fast in Chrome too but not frozen, I
>     believe there is
>     > already a way to speed up typed stuff (didn't check how it's
>     done though) so
>     > I wonder how come Object.freeze() is not taking similar approach
>     "typizing"
>     > behind the scene the object improving all static properties getters
>     > (probably dropping those getters where possible unless defined
>     as such)
>     Frozenness is largely irrelevant for typed arrays, since all array
>     accesses are defined by a magic nameless getter/setter pair per the
>     WebIDL spec.
>     /Andreas
> _______________________________________________
> es-discuss mailing list
> es-discuss at

Email :  avitte at
iAnonym :
node-Tor :
GitHub :
Web :
Webble :
Extract Widget Mobile :
BlimpMe! :

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list