W3C home > Mailing lists > Public > www-svg@w3.org > April 2009

Re: Selectors, getElementsByTagName() and camelCase SVG

From: Jonas Sicking <jonas@sicking.cc>
Date: Wed, 1 Apr 2009 12:42:03 -0700
Message-ID: <63df84f0904011242w2de46cbk4fb23d2e4ebaf8a6@mail.gmail.com>
To: Maciej Stachowiak <mjs@apple.com>
Cc: Henri Sivonen <hsivonen@iki.fi>, HTML WG <public-html@w3.org>, www-svg <www-svg@w3.org>
On Wed, Apr 1, 2009 at 11:42 AM, Maciej Stachowiak <mjs@apple.com> wrote:
> On Apr 1, 2009, at 6:57 AM, Henri Sivonen wrote:
>> On Apr 1, 2009, at 16:39, Henri Sivonen wrote:
>>> Making the comparisons actually case-sensitive seems bad at least in the
>>> context of Gecko.
>> Oops. That should have been:
>>> Making the comparisons actually case-*in*sensitive seems bad at least in
>>> the context of Gecko.
> Oops, should have read this email before replying to the last one. Why would
> this be bad?

Performance wise a case insensitive compare is *much* more expensive
than a case sensitive one. Especially since there are neat tricks you
can do for case sensitive compares which turns a string compare into
basically a pointer compare.

However I think we'd get the effect of a case insensitive compare if
we made getElementsByTagName use the same case-correcting algorithm as
the parser does.

/ Jonas
Received on Wednesday, 1 April 2009 19:42:55 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:17 UTC