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
// Transpiled "Object.assign"
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var a = { a: 1 };
var b = {};
for (var i = 0; i < 10000; i++) {
b['b' + i] = i;
}
var a = { a: 1 };
var b = {};
for (var i = 0; i < 10000; i++) {
b['b' + i] = i;
}
Ready to run.
Test | Ops/sec | |
---|---|---|
Transpiled new object and spread syntax |
| ready |
Transpiled Object.assign |
| ready |
Native new object and spread syntax |
| ready |
Native Object.assign |
| ready |
for...in |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.