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="http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script>
var MAX = 1000;
var elements = {};
for(var i = 0; i < MAX; ++i){
var $el = $('<p id="foo' + i + '">Test</p>').appendTo($(document.body));
elements['foo' + i] = $el[0];
}
var c = 0;
var next = function(){
c++;
if(c === MAX) c = 0;
return 'foo' + c;
}
</script>
c = 0;
Ready to run.
Test | Ops/sec | |
---|---|---|
getElById |
| ready |
jQuery |
| ready |
jQuery with getElById |
| ready |
getElById - |
| ready |
jQuery - |
| ready |
indexed |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.