(This is really directed at the jQuery core team) I notice that jQuery uses regexp statements like this one... (used in the position() and offsetParent() methods for example)
.../^body|html$/i.test(offsetParent.tagName) Might it be faster to use a simple object hash like this instead...? var test = {BODY:true, HTML:true}; ...test[offsetParent.tagName]; I did some crude experiments and found that the hash technique was at least 4 times faster in IE7 and 15 times faster in FF3. I've dumped some more info on http://blog.softwareunity.com/ I'm interested to hear people's opinions on this as a performance booster. (What shall I call it? Sizzle perhaps? No maybe that one's taken...)