jQuery Cached Set

JavaScript performance comparison

Revision 23 of this test case created


Compare performance of cached vs repeated element selections

Preparation code

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

<div class="ContentDetail Rank Rank5">
        <table id="rankTable"
                style="word-break: break-all; min-width: 956px; width: 250px;">
                        <tr id="trDateInterval">
                                <th colspan="2">20120301 ~ 20120810</th>
                        <tr id="trArticle" class="bg">
                        <tr id="trRank0">
                        <tr id="trRank1">
<tr id="trRank2">
<tr id="trRank3">
<tr id="trRank4">
<tr id="trRank5">


Preparation code output

20120301 ~ 20120810
연관어 문서수

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
'div.Rank5 tr:odd'
$('#rankTable tbody tr').append('<td></td>').text("label");
$('#rankTable tbody tr').append('<td></td>').text("freq");
'.Rank5 tr:odd'
$('#rankTable tbody tr').append('<td>label</td>');
$('#rankTable tbody tr').append('<td>freq</td>');

Compare results of other browsers


You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:


Comment form temporarily disabled.

Add a comment