jsPerf.app is an online JavaScript performance benchmark test runner & jsperf.com mirror. It is a complete rewrite in homage to the once excellent jsperf.com now with hopefully a more modern & maintainable codebase.
jsperf.com URLs are mirrored at the same path, e.g:
https://jsperf.com/negative-modulo/2
Can be accessed at:
https://jsperf.app/negative-modulo/2
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.3.0.js"></script>
<table class="mytable">
<thead>
<tr>
<th>head0</th>
<th>head1</th>
<th>head2</th>
<th>head3</th>
<th>head4</th>
<th>head5</th>
</tr>
<thead>
<tbody style="display:none">
<tr>
<td>bodi0</td>
<td>bodi1</td>
<td>bodi2</td>
<td>bodi3</td>
<td>bodi4</td>
<td>bodi5</td>
</tr>
</tbody>
</table>
var num_rows = 6000;
var data = [];
for (var i = 0; i < num_rows; i++) {
data.push({
body0: 'bodi0',
body1: 'bodi1',
body2: 'bodi2',
body3: 'bodi3',
body4: 'bodi4',
body5: 'bodi5'
});
}
var html = '{{#each rows}}<tr>';
html += '<td>{{body0}}-{{@index}}</td>';
html += '<td>{{body1}}-{{@index}}</td>';
html += '<td>{{body2}}-{{@index}}</td>';
html += '<td>{{body3}}-{{@index}}</td>';
html += '<td>{{body4}}-{{@index}}</td>';
html += '<td>{{body5}}-{{@index}}</td>';
html += '</tr>{{/each}}';
var tmpl = Handlebars.compile(html);
var $body = $('.mytable tbody');
$body.empty();
Ready to run.
Test | Ops/sec | |
---|---|---|
handlebars |
| ready |
native |
| ready |
handlebars jq parse |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.