next sibling native v jQuery

Benchmark created by Tom Maton 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