Re: Why is querySelector much slower?

> querySelector with an id selector does in fact benefit from the id hashtable

Looking at the microbenchmark again, for Gecko, getElementById is around 300x faster than querySelector('#id'), and even getElementsByClassName is faster than it. It doesn't look like it benefits much from an eagerly populated hash table?

P.S it's very interesting to see Gecko is around 100x faster than others when it comes to the performance of getElementById. It probably does something unusual?

Received on Tuesday, 28 April 2015 06:59:40 UTC