selectors benchmark

Benchmark created by drizzlecloudy on


Preparation HTML

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

<script>
var parent;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
native byId
parent = document.getElementById('parent');
ready
native querySelector
parent = document.querySelector('parent');
ready

Revisions

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

  • Revision 1: published by drizzlecloudy on