Re: W3C can say (?) what an ID means to CSS4, in the fast profile context

(little side track, as we can't do this anyway as both you and Boris said)

> On 08 Apr 2015, at 01:11, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> There's no significant speed difference between matching all elements
> with a given ID vs matching only the first, so I don't think there's
> really a use-case for doing this.

Really? I'd think matching all elements with a given ID is actually faster
than matching only the first, and possibly significantly so.

If an ID selector matches all elements with the id, to find out if any given
element matches you only need to consider this element in isolation, but if
an ID selector matches only the first one, you now need to take the whole dom
into account (or build additional data structures to keep track of the
relevant info), making the whole thing slower, or more memory intensive of
both. No?

 - Florian

Received on Wednesday, 8 April 2015 08:17:36 UTC