title: How to use document.querySelectorAll() into jQuery for performance?
body: <p>I have read that there can be significant performance improvements by switching over to <code>document.querySelectorAll()</code> rather than using jQuery's native selector.</p>
  <p>Would doing the following have any performance benefit in jQuery, for instances involving thousands of elements and nested loops, etc.</p>
  <pre><code>//using querySelectorAll
  
  elems = document.querySelectorAll('.element');
  $(elems).addClass(&quot;className&quot;);  
  </code></pre>
  <p>As opposed to doing:</p>
  <pre><code>//traditional jQuery
  elems = $(&quot;.element&quot;);
  $(items).addClass(&quot;className&quot;);
  </code></pre>
  <p>If not, what is a way that we can incorporate <code>document.querySelectorAll</code> into jQuery?</p>