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 Person = function(name, lastname, age) {
this.name = name;
this.lastname = lastname;
this.age = age;
}
Person.prototype.get_name = function() {
return this.name;
};
Person.prototype.toString = function() {
return this.name + ' ' + this.lastname + ' (' + this.age + ')';
};
var person = function(name, lastname, age) {
var name = name;
var lastname = lastname;
var age = age;
function get_name() {
return name;
};
function toString() {
return name + ' ' + lastname + ' (' + age + ')';
};
return {
get_name: get_name,
toString: toString
};
};
_p = [];
_c = [];
var i;
for (i = 0; i < 100; ++i) {
_p.push(new Person('John', 'Doe', 42));
_c.push(person('John', 'Doe', 42));
}
Ready to run.
Test | Ops/sec | |
---|---|---|
Prototype read |
| ready |
Closure read |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.