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 dummyclass = (function() {
var _privateMethod1 = function() {
var i = 10000;
var a = [];
while(i--) {
a.push("hello world");
}
return a;
}
var _privateMethod2 = function() {
var i = 10000;
var a = [];
while(i--) {
a.push("hello world");
}
return a;
}
var _privateMethod3 = function() {
var i = 10000;
var a = [];
while(i--) {
a.push("hello world");
}
return a;
}
var _privateMethod4 = function() {
var i = 10000;
var a = [];
while(i--) {
a.push("hello world");
}
return a;
}
var _privateMethod5 = function() {
var i = 10000;
var a = [];
while(i--) {
a.push("hello world");
}
return a;
}
var constructor = function(iUserId) {
this.iUserId = iUserId;
}
constructor.prototype.public_method1 = function() {
var i = 10000;
var a = [];
while(i--) {
a.push("hello world");
}
return a;
}
constructor.prototype.public_method_test = function() {
var i = 10;
while(i--) {
_privateMethod5.call(this);
}
}
return constructor;
})();
var dummyclassb = function(iUserId) {
this.iUserId = iUserId;
}
dummyclassb.prototype._privateMethod1 = function() {
var i = 10000;
var a = [];
while(i--) {
a.push("hello world");
}
return a;
}
dummyclassb.prototype._privateMethod2 = function() {
var i = 10000;
var a = [];
while(i--) {
a.push("hello world");
}
return a;
}
dummyclassb.prototype._privateMethod3 = function() {
var i = 10000;
var a = [];
while(i--) {
a.push("hello world");
}
return a;
}
dummyclassb.prototype._privateMethod4 = function() {
var i = 10000;
var a = [];
while(i--) {
a.push("hello world");
}
return a;
}
dummyclassb.prototype._privateMethod5 = function() {
var i = 10000;
var a = [];
while(i--) {
a.push("hello world");
}
return a;
}
dummyclassb.prototype.public_method1 = function() {
var i = 10000;
var a = [];
while(i--) {
a.push("hello world");
}
return a;
}
dummyclassb.prototype.public_method_test = function() {
var i = 10;
while(i--) {
this._privateMethod5();
}
}
var oDummyA = new dummyclass(5);
var oDummyB = new dummyclassb(5);
Ready to run.
Test | Ops/sec | |
---|---|---|
Initialize: standard prototype |
| ready |
Initialize: module pattern |
| ready |
Execution: standard prototype |
| ready |
Execution: module pattern |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.