js+jq

Benchmark created by jocage on


Preparation HTML

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


<div id=menu>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>

<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>

<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>

<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>

<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>

<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
<a href="http://jquery.com">jQuery</a>
</div>

Test runner

Ready to run.

Testing in
TestOps/sec
getElementById
var menu = document.getElementById('menu');
$('a', menu);
ready
$('a', '#menu' );
$('a', '#menu');
ready
find
$('#menu').find('a');
ready
find 2
$('#menu a');
ready
jq
var menu = $('#menu');
$('a', menu);
ready
nativ js
var menu = document.getElementById('menu');
menu.querySelectorAll('a');
ready

Revisions

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

  • Revision 1: published by jocage on