jQuery CSS3 Not vs. .Not() (v22)

Revision 22 of this benchmark created on


Preparation HTML

<div id="container">
  <div id="header">
    Header
  </div>
  <div>
    Div
  </div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Filter Method by javascript
var d = $('div').filter(function() {
  return this.id !== 'header';
});
ready
CSS3 Selector
var d = $('div:not(#header)');
ready
Not() Method
var d = $('div').not('#header');
ready
Filter Method by jQuery
var d = $('div').filter(function() {
  return $(this).attr('id') !== 'header';
});
ready
Filter Method by string
var d = $('div').filter(":not(#header)");
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.