Thread:Talk:JavaScript performance/Selector performance, contexts/reply

Although it's not bad, the syntax you proposed is slower.

What that does is, it goes through all of jQuery's initializer and eventually at the bottom it calls (literally):.

The reason jQuery supports the syntax is, for example, in case plugins provide a variable as context that would otherwise cause plugins from having to write code like this: instead you can use: And jQuery will figure it out, after it doesn't recognize the standard syntax.

However if you know what you're doing and the context is not variable but known, it's much better to just do  directly.