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>
var testA = {subdata:{a:123,b:345,c:456,d:567,ac:123,bd:345,cd:456,dd:567,qac:123,bdw:345,ecd:456,dde:567}};
</script>
<div id="hey"></div>
var test = {a:123,b:345,c:456,d:567,ac:123,bd:345,cd:456,dd:567,qac:123,bdw:345,ecd:456,dde:567};
var a=function() {
var result = '';
for (var i in testA.subdata) {
result += '&'+i+'='+encodeURIComponent(testA.subdata[i]);
}
return result;
}
var b=function() {
var result = '',c=testA.subdata;
for (var i in c) {
result += '&'+i+'='+encodeURIComponent(c[i]);
}
return result;
}
var c = function(c) {
var result = '';
for (var i in c) {
result += '&'+i+'='+encodeURIComponent(c[i]);
}
return result;
}
Ready to run.
Test | Ops/sec | |
---|---|---|
for in with push |
| ready |
Object.keys with push |
| ready |
in with Strings |
| ready |
for in with push 2 |
| ready |
| ready | |
| ready | |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.