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>
P0 = function() {};
P0.prototype.foo = 'bar';
on = {};
current = on;
for (var i = 1, l = 10; i < l; i++) {
this['P' + i] = function() {};
this['P' + i].prototype = new this['P' + (i - 1)];
current = current[String.fromCharCode(i + 96)] = {};
}
pn = new this['P' + (l - 1)];
current.foo = 'bar';
var p = new P4;
var o = {
a: {
b: {
c: {
d: {
foo: 'bar'
}
}
}
}
}
var p1 = new P1;
var o1 = {
foo: 'bar'
};
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
access prototype chain |
| ready |
access property |
| ready |
1-lvl chain |
| ready |
1-lvl access |
| ready |
n-depth prototype chain |
| ready |
n-depth object lookup |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.