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 create = Object.create;
var MyClass = function(x, y) {
this.x = x;
this.y = y;
}
var Factory = function(x, y) {
return { 'x': x, 'y': y }
};
var CreateFactory = function(x, y) {
return create(null, {
'x': {value: x},
'y': {value: y}
});
};
function doSomething(obj) {
var x = obj.x + obj.y,
y = obj.x * obj.y,
z = obj.x - obj.y;
return x * y * z;
}
var x = 0 | (Math.random() * 10000),
y = 0 | (Math.random() * 10000);
Ready to run.
Test | Ops/sec | |
---|---|---|
new operator |
| ready |
Factory |
| ready |
Object.create() |
| ready |
create() |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.