ok, forget it, if the tag name is at the end of the stirng the hash is still
faster. The RegExp is the slowest, with or without /i ... FireFox 3.0.6

Regards

On Thu, Feb 5, 2009 at 5:41 PM, Andrea Giammarchi <
[email protected]> wrote:

> If this suggestion is just to know if the nodeName exists, I wonder if
> ~"BODY.HEAD.WHATEVER".indexOf(nodeName) could be even faster (core static
> string search instead of dynamic hash table)
>
> Regards
>
>
> On Thu, Feb 5, 2009 at 5:00 PM, Karl Swedberg <[email protected]>wrote:
>
>>
>> On Feb 5, 2009, at 10:59 AM, Már Örlygsson wrote:
>>
>>
>> I thought simple regular expressions were lightning fast in modern
>> browsers.
>> Bulking up the code with tagName hashes hardly seems worth it.
>>
>> --
>> Már Örlygsson
>>
>>
>>
>> Benchmark tests would certainly answer that question.
>>
>> George, Do you have tests for the case-insensitive object hash approach?
>> Would be great to see the difference between that and regex, so we don't
>> have to rely on subjective ideas about what we *think* browsers should do.
>>
>> --Karl
>> ____________
>> Karl Swedberg
>> www.englishrules.com
>> www.learningjquery.com
>>
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to