next sibling native v jQuery (v2)

Revision 2 of this benchmark created by Blangel on


Preparation HTML

<div id="header">
 <div>
  <p>text text</p>
  <p>text text</p>
  <p>text text</p>
  <p>text text</p>
  <p>text text</p>
  <p>text text</p>
  <p>text text</p>
 </div>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
Native JS
document.getElementById('header').nextSibling
ready
jQuery
$('#header').next()
ready

Revisions

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

  • Revision 1: published by Tom Maton on
  • Revision 2: published by Blangel on