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 sharedPrototype = {
one: function() {
return 1;
},
two: function() {
return 2;
},
three: function() {
return 3;
}
};
var crockfordCreate = function(proto) {
var f = function() {};
f.prototype = proto;
return new f();
};
var jorgeCreate = (function() {
var f = function() {};
return function(proto) {
f.prototype = proto;
return new f();
};
})();
var Constructor = function() {};
Constructor.prototype = sharedPrototype;
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Object.create() |
| ready |
Crockford Create |
| ready |
Jorge Create |
| ready |
Constructor |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.