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 giveRights = (function() {
var vote = function() {
return 1;
}
var age = function() {
return 2;
}
var die = function() {
return 3;
}
return function() {
this.vote = vote;
this.age = age;
this.die = die;
}
}());
var mixObjects = function(obj1, obj2) {
for (var key in obj2) {
if (obj2.hasOwnProperty(key)) {
obj1[key] = obj2[key];
}
}
return obj2;
}
var rights = {
vote: function() {
return 1;
},
age: function() {
return 2;
},
die: function() {
return 3;
}
}
Ready to run.
Test | Ops/sec | |
---|---|---|
Normal Mixin |
| ready |
Function mixin |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.