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 myPrototype = {methodA: function () {},methodB: function () {},
methodC: function () {}};
Obj = function() {this.p = 1;}
//superclass method
Obj.prototype.methodA= function () {};
Obj.prototype.methodB= function () {};
Obj.prototype.methodC= function () {};
function factory( func ) {
var obj = {};
var args = [];
for (var i=1, l=arguments.length; i<l; i++) args[i-1] = arguments[i];
func.apply( obj, args );
obj.constructor = func;
return obj;
}
propObj = {
p: {
value: 1
}
};
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Object.create() using in-place property object |
| ready |
Object.create() using pre-defined property object |
| ready |
Constructor function |
| ready |
Object literal |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.