Re: [dom] matches, querySelector, etc. shouldn't throw on an unrecognized selector (#39)

We could do performance measurements.

The performance improvement from using a pre-parsed selector is quite noticeable in real-world cases. So browsers have internal parsed-selector caches, possibly with some sort of eviction heuristics, for the existing querySelectorAll methods.

Exposing a `Selector` would mostly just allow avoiding an extra hashtable lookup in this cache in the "test whether it's supported, then if it is query" use case.  So yeah, maybe not that useful.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/39#issuecomment-110344969

Received on Tuesday, 9 June 2015 12:43:24 UTC