$(document).find

JavaScript performance comparison

Test case created by pg

Preparation code

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
    <div class="container no-gutter">
        <a href="#" class="logo"> Example</a>
        <div class="header-actions">
            <ul class="nav-left-to-right">
                <li><div><a href="/ratta_lott.php" class="nav-link gray-variant">Rätta lott</a></div></li>
                <li><div><a href="/overlay-test.html" class="nav-link green-variant js-load-overlay">Gå med</a></div></li>
                <li><div><a href="/partials/loginDropdown2.html" class="nav-link blue-variant js-load-overlay" >Logga in</a></div></li>
            </ul>
        </div>
    </div>
    <div class="container no-gutter">
        <a href="#" class="logo"> Example</a>
        <div class="header-actions">
            <ul class="nav-left-to-right">
                <li><div><a href="/ratta_lott.php" class="nav-link gray-variant">Rätta lott</a></div></li>
                <li><div><a href="/overlay-test.html" class="nav-link green-variant js-load-overlay">Gå med</a></div></li>
                <li><div><a href="/partials/loginDropdown2.html" class="nav-link blue-variant js-load-overlay" >Logga in</a></div></li>
            </ul>
        </div>
    </div>
    <div class="container no-gutter">
        <a href="#" class="logo"> Example</a>
        <div class="header-actions">
            <ul class="nav-left-to-right">
                <li><div><a href="/ratta_lott.php" class="nav-link gray-variant">Rätta lott</a></div></li>
                <li><div><a href="/overlay-test.html" class="nav-link green-variant js-load-overlay">Gå med</a></div></li>
                <li><div><a href="/partials/loginDropdown2.html" class="nav-link blue-variant js-load-overlay" >Logga in</a></div></li>
            </ul>
        </div>
    </div>
    <div class="container no-gutter">
        <a href="#" class="logo"> Example</a>
        <div class="header-actions">
            <ul class="nav-left-to-right">
                <li><div><a href="/ratta_lott.php" class="nav-link gray-variant">Rätta lott</a></div></li>
                <li><div><a href="/overlay-test.html" class="nav-link green-variant js-load-overlay">Gå med</a></div></li>
                <li><div><a href="/partials/loginDropdown2.html" class="nav-link blue-variant js-load-overlay" >Logga in</a></div></li>
            </ul>
        </div>
    </div>
    <div class="container no-gutter">
        <a href="#" class="logo"> Example</a>
        <div class="header-actions">
            <ul class="nav-left-to-right">
                <li><div><a href="/ratta_lott.php" class="nav-link gray-variant">Rätta lott</a></div></li>
                <li><div><a href="/overlay-test.html" class="nav-link green-variant js-load-overlay">Gå med</a></div></li>
                <li><div><a href="/partials/loginDropdown2.html" class="nav-link blue-variant js-load-overlay" >Logga in</a></div></li>
            </ul>
        </div>
    </div>
    <div class="container no-gutter">
        <a href="#" class="logo"> Example</a>
        <div class="header-actions">
            <ul class="nav-left-to-right">
                <li><div><a href="/ratta_lott.php" class="nav-link gray-variant">Rätta lott</a></div></li>
                <li><div><a href="/overlay-test.html" class="nav-link green-variant js-load-overlay">Gå med</a></div></li>
                <li><div><a href="/partials/loginDropdown2.html" class="nav-link blue-variant js-load-overlay" >Logga in</a></div></li>
            </ul>
        </div>
    </div>

Preparation code output

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
document.find
$(document).find('.js-load-overlay');
pending…
$()
$('.js-load-overlay');
pending…

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

Compare results of other browsers

0 comments

Add a comment