jQache (v3)

Revision 3 of this benchmark created on


Description

How does it compare with on-the-fly caching ?

Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<script src="//jqache.com/js/jqache-0.1.1.min.js">
</script>
<div id="container" style="display: none;">
  <ul>
    <li>
      1
    </li>
    <li class="target">
      2
    </li>
    <li id="target">
      3
    </li>
  </ul>
</div>

Setup

var $target = $("#target");
    var $container = $("#container");

Test runner

Ready to run.

Testing in
TestOps/sec
Default jQuery
$('#target').css('border', '1px solid red');
$('#container .target').css('border', '1px solid red');
 
ready
With jQache
$.q('#target').css('border', '1px solid red');
$.q('#container .target').css('border', '1px solid red');
 
ready
With on-the-fly Cache
$target.css('border', '1px solid red');
$container.find('.target').css('border', '1px solid red');
ready

Revisions

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