jQuery vs Prevel (v4)

Revision 4 of this benchmark created by cacacacaca on


Description

error

Preparation HTML

<script src="https://cdn.githubusercontent.com/chernikovalexey/Prevel/master/prevel-min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

<div style="width: 100%; height:650px; overflow:hidden">
<table id="test-table">
        <thead>
                <tr>
                        <th>Column_1</th>
                        <th>Column_2</th>
                        <th>Column_3</th>
                </tr>
        </thead>
        <tbody>
                <tr class="row1">
                        <td>1</td>
                        <td>2</td>
                        <td>3</td>
                </tr>
                <tr class="row2">
                        <td>1</td>
                        <td>2</td>
                        <td>3</td>
                </tr>
                <tr class="row1">
                        <td>1</td>
                        <td>2</td>
                        <td>3</td>
                </tr>
                <tr class="row2">
                        <td>1</td>
                        <td>2</td>
                        <td>3</td>
                </tr>
        </tbody>
</table>
</div>

Test runner

Ready to run.

Testing in
TestOps/sec
ready
ready
ready
ready
Prevel find
for (var i = 0; i < 10000; i++) {
  pl('#test-table .row1')
}
ready
jQuery find
for (var i = 0; i < 10000; i++) {
  $('#test-table .row1')
}
ready
jQuery append
var table_body = $('#test-table tbody');
for (var i = 0; i < 50; i++) {
  table_body.append('<tr><td>1</td><td>2</td><td>3</td></tr>');
}
ready
Prevel append
var table_body = pl('#test-table tbody');
for (var i = 0; i < 50; i++) {
  table_body.append('<tr><td>1</td><td>2</td><td>3</td></tr>');
}
ready

Revisions

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

  • Revision 1: published by sfagnum on
  • Revision 3: published by lorem ipsum on
  • Revision 4: published by cacacacaca on