Re: [whatwg] Case-sensitivity of CSS type selectors in HTML

On 5/8/15 11:56 AM, Roger Hågensen wrote:
> One way to cheapen the computational cost is to have partial case
> insensitive matching.

If you're walking the string at all, you have already lost in terms of 
performance for this stuff.

> If (character >= $0041) And (character <= $005A)
>      character = (character | $0020)
> EndIf

Yes, this is basically the algorithm that would be considered "expensive 
case-insensitive matching" in this context.

> In optimized C or or ASM this should perform really well compared to
> calling a Unicode function to normalize and lower case the text.

No one is even remotely considering anything Unicode here.

-Boris

Received on Friday, 8 May 2015 16:09:56 UTC