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
Which is faster: create DOM elements using jQuery() or innerHTML?
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<div id="container" style="height:200px;overflow:auto;"></div>
var markup = '<div class="video">\
<h1 ng-model="someModel">Default video title</h1>\
<img ng-src="otherModel" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" width="1" height="1" />\
<p ng-model="textModel">awesome video</p>\
</div>';
var div = document.createElement('div');
var el = document.getElementById("container");
Ready to run.
Test | Ops/sec | |
---|---|---|
By jQuery |
| ready |
By innerHTML |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.