jQuery brackets vs get

Benchmark created on


Description

Test jQuery element access using brackets vs get

Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

<div id="mydiv">
</div>
<script>
  var $node = jQuery('#mydiv');
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Brackets
var n = $node[0];
ready
Get
var n = $node.get(0);
ready

Revisions

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