:not vs .not _01

JavaScript performance comparison

Test case created

Preparation code

<!doctype html>
<html>
 
  <head>
    <meta charset="UTF-8">
    <title>
      無題ドキュメント
    </title>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
    </script>
  </head>
 
  <body>
    <div id="box">
      <div>
      </div>
      <div>
      </div>
      <div class="test">
      </div>
    </div>
  </body>

</html>

Preparation code output

無題ドキュメント

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
:not
var $box = $(document.getElementById("box"));
$box.find("div:not(.test)").show();
pending…
.not
var $box = $(document.getElementById("box"));
$box.find("div").not("div.test").show();
pending…

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

Compare results of other browsers

0 comments

Add a comment