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
var testObject = {
propertyOne: 1,
propertyTwo: 'Two'
};
var testMethods = {
methodOne: methodOne,
methodTwo: methodTwo
};
testClass.prototype = testMethods;
function combineObjects(objOne, objTwo) {
var keys = Object.keys(objTwo);
for (var ii = 0; ii < keys.length; ii++) {
var key = keys[ii];
var src = objTwo[key];
objOne[key] = src;
}
}
function methodOne() {
return this.propertyOne;
}
function methodTwo() {
return this.propertyTwo;
}
function testClass(object) {
combineObjects(this, object);
}
Ready to run.
Test | Ops/sec | |
---|---|---|
Class |
| ready |
Closure |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.