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
function get_name() {
return this.name;
}
function set_name(name) {
this.name = name;
}
function Person(name) {
this.name = name;
}
Person.prototype.get_name = get_name;
Person.prototype.set_name = set_name;
var person = function(name) {
return {
'name': name,
'get_name': get_name,
'set_name': set_name
};
};
var p = new Person('John');
var dp = Person.prototype;
var pc = p.constructor.prototype;
var c = person('John');
Ready to run.
Test | Ops/sec | |
---|---|---|
Prototype init |
| ready |
Closure init |
| ready |
Prototype read |
| ready |
Prototype direct read |
| ready |
Prototype constructor read |
| ready |
Closure read |
| ready |
Prototype write |
| ready |
Prototype direct write |
| ready |
Prototype constructor write |
| ready |
Closure write |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.