title: How to do a quick search filter on key up?
body: <p>I'm trying to add a filter functionality in a table with bunch of table data in it. Almost 800 <code>td</code>.</p>
  
  <p>I can able to search the text when typing in the input but my logic is very slow. It is not allowing me to write the text fully before it searches, kind of stucking in the text input.</p>
  
  <p>So i'm looking for a help to find what is wrong in this code. How to optimize this? Can any one help me.</p>
  
  <p>Here is the CODE</p>
  
  <pre><code>jQuery("#sear").keyup(function(){
  var searching_val = jQuery(this).val();
  var mysearch = new RegExp(searching_val,'gi'); 
  jQuery("#container td").each(function(){
  if(mysearch.test(jQuery(this).data('samp'))){
      jQuery(this).show();
  }else{
      jQuery(this).fadeOut();
  }
     });
  });
  </code></pre>
  
  <p><a href="http://jsfiddle.net/m74bvsdo/" rel="nofollow">JSFIDDLE</a></p>
  
  <p>The example i shown in fiddle is having only two rows. In Real i have More <code>Rows</code> with More <code>Table Data</code>.</p>
  
  <p>Is this is common behaviour when we have more <code>td</code>? Or Is there a way to optimize this? I cannot avoid looping through <code>&lt;td&gt;</code> <code>data-samp</code> attribute too because content are different format, those are not as seen in sample. So all those are store in data attribute of a table <code>td</code> to retrieve it for input.</p>
  
  <p>Any help would be appreciated.</p>