W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2015

Re: Why is querySelector much slower?

From: Boris Zbarsky <bzbarsky@mit.edu>
Date: Wed, 29 Apr 2015 09:11:47 -0400
Message-ID: <5540D893.2040500@mit.edu>
To: Glen Huang <curvedmark@gmail.com>
CC: public-webapps <public-webapps@w3.org>
On 4/29/15 12:23 AM, Glen Huang wrote:
>> because of the proxy machinery involved on the JS engine side
>
> Do you mean the cost introduced by passing a C++ object into ecmascript world?

No, it's the cost introduced by needing custom property behavior for 
integer-named properties on lists (and in particular the need to have 
them appear and disappear, not be redefinable, and so forth).  The 
upshot in the SpiderMonkey implementation is that the list object is a 
proxy in the ES6 sense, which makes the [0] access take a slower path 
through the JS engine than I'd like.

-Boris
Received on Wednesday, 29 April 2015 13:12:22 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:27:31 UTC