"Optimize Selectors" guide requires update?
- // Fast:
- $( "#container div.robotarm" );
- // Super-fast:
- $( "#container" ).find( "div.robotarm" );
approach is faster because the first selection is handled without going through the Sizzle selector engine – ID-only selections are handled using
, which is extremely fast because it is native to the browser.
- Google Chrome 35: about 91% slower
- Internet Explorer 11: about 8% slower
- Firefox 29: about 27% faster
is faster to more users and with time the situation will continue to change.
This issue requires testing in different operating systems and browsers with various selectors. Please help testing!