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
function forInES5(object, iterator) {
var keys, key;
do {
keys = Object.keys(object);
while ((key = keys.shift()) != null) {
iterator(object[key], key, object);
}
} while ((object = Object.getPrototypeOf(object)));
}
function forInOld(object, iterator) {
for (var key in object) {
if (object.hasOwnProperty(key)) {
iterator(object[key], key, object);
}
}
}
function GrandParent() { }
function Parent() { }
Parent.prototype = Object.create(GrandParent.prototype);
function Child() { }
Child.prototype = Object.create(Parent.prototype);
var kid = new Child;
kid.name = 'timmy';
kid.age = '10';
function callback() { }
Ready to run.
Test | Ops/sec | |
---|---|---|
ES5 |
| ready |
Old |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.