parentNode vs jQuery parent (v6)

Revision 6 of this benchmark created on


Description

Speed difference between jQuery helper method and raw JS

Preparation HTML

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

<div id="parent">
  <div id="child"></div>
</div>

Test runner

Ready to run.

Testing in
TestOps/sec
child[0].parentNode
var child = $('#child'),
    parent = child[0].parentNode;
 
ready
child.get(0).parentNode
var child = $('#child'),
    parent = child.get(0).parentNode;
ready

Revisions

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