jQuery selector polyfill (v2)

Revision 2 of this benchmark created by Luke Shumard on


Preparation HTML

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

Test runner

Ready to run.

Testing in
TestOps/sec
Global variable (if available)
var contentSelector = contentSelector || $('#contentSelector'),
    thisContentSelector = (contentSelector!==window) ? $(contentSelector) : $('#contentSelector');
ready
getElementById
var thisContentSelector = $('#contentSelector');
ready

Revisions

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

  • Revision 1: published by Mathias Bynens on
  • Revision 2: published by Luke Shumard on