what is faster - check element property vs check element position
<p>Ok... I have the following setup:</p>

<p>A div with n divs as children (n being quite big). I need to hide/remove (doesn't really matters - i think remove is better though, if you have an opinion here is helpful) the 3rd, 4th, 5th, 6th, 9th, 10th, 11th, 12, 15, 16, etc. (n+1 modulo 6 > 1 - 0 and 1 will not be hidden).</p>

<p>What is faster:
   Get the parent div children and use the logic to hide divs:</p>

<pre><code>   childrenArray = document.getElementById('id').childNodes;
   lng = childrenArray.length;
   for (i = 0; i &lt; lng; i++) 
     if (i % 6 &gt; 1)
      // Remove here.
</code></pre>

<p>Or add a class to desired nodes and check for it. jQuery class selector (or a hand written script which would be actually faster) and then remove.</p>

<p>Note: Before you say to you jQuery class selector is better consider that the array is still checked.</p>

<p>So basically what is faster check an element property or do a mathematical operation and a comparison?</p>
