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
Klass1 = function() {}
Klass1.prototype.a = function() {
log('thislog');
}
Klass1.prototype.b = function() {
log('thislog');
}
Klass1.prototype.c = function() {
log('thislog');
}
Klass1.prototype.d = function() {
log('thislog');
}
Klass1.prototype.e = function() {
log('thislog');
}
Klass1.prototype.f = function() {
log('thislog');
}
Klass1.prototype.g = function() {
log('thislog');
}
Klass1.prototype.h = function() {
log('thislog');
}
Klass1.prototype.i = function() {
log('thislog');
}
Klass2 = function() {
var a = function() {
log('thislog');
},
b = function() {
log('thislog');
},
c = function() {
log('thislog');
},
d = function() {
log('thislog');
},
e = function() {
log('thislog');
},
f = function() {
log('thislog');
},
g = function() {
log('thislog');
},
h = function() {
log('thislog');
},
i = function() {
log('thislog');
};
return {a:a,b:b,c:c,d:d,e:e,f:f,g:g,h:h,i:i};
}
var aFunction = function() {
log('thislog');
};
var bFunction = function() {
log('thislog');
};
var cFunction = function() {
log('thislog');
};
var dFunction = function() {
log('thislog');
};
var eFunction = function() {
log('thislog');
};
var fFunction = function() {
log('thislog');
};
var gFunction = function() {
log('thislog');
};
var hFunction = function() {
log('thislog');
};
var iFunction = function() {
log('thislog');
};
Klass3 = function() {
return {a:aFunction,b:bFunction,c:cFunction,d:dFunction,e:eFunction,f:fFunction,g:gFunction,h:hFunction,i:iFunction};
};
Ready to run.
Test | Ops/sec | |
---|---|---|
Prototypal |
| ready |
Module pattern |
| ready |
Module pattern with cached functions |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.