js-selectors

Benchmark created by trinhle on


Preparation HTML

<!DOCTYPE html>
<html>
<body>
<div id='menu'>
<a href="http://www.w3schools.com">
This is a link</a>
</div>
</body>
</html>

Test runner

Ready to run.

Testing in
TestOps/sec
querySelectorAll
var elements = document.querySelectorAll('#menu a');
ready
getElement
var elements = document.getElementById('menu').getElementsByTagName('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 trinhle on