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="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<p id="foo">
Test
</p>
<script>
var wrap = function(id) {
return $(document.getElementById(id))
};
var wrap2 = (function(window) {
var doc = window.document;
var jq = window.jQuery.fn.init;
return function(id) {
return new jq(doc.getElementById(id));
};
})(this);
</script>
var $el;
$el[0].id = "foo";
Ready to run.
Test | Ops/sec | |
---|---|---|
getElementById |
| ready |
jQuery |
| ready |
wrap |
| ready |
wrap2 |
| ready |
unwrap2 |
| ready |
window.document.getElementbyID |
| ready |
unwrap2 + window |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.