Are frozen Objects faster ?
andrea.giammarchi at gmail.com
Thu Feb 14 12:50:27 PST 2013
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 google.com>wrote:
> On 14 February 2013 21:36, Andrea Giammarchi
> <andrea.giammarchi at gmail.com> 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
> > 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
> > 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss