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
Updated LoDash
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.18/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.8.0/lodash.js"></script>
var __ = {
forEachRight: function(obj, callback) {
for (i = obj.length - 1; i >= 0; i--) {
callback(obj[i]);
}
}
};
var dataset, i, retObj = {}, stats = [{
"window": "lifetime",
"source": "DX",
"spend": "1642.81",
"ideal_spend": "2989.86",
"pace": "43",
"impressions": "224929",
"actions": "189",
"cpm": "3.90",
"ideal_cpm": "2.81",
"cpa": "25.82"
}, {
"window": "yesterday",
"source": "DX",
"spend": "1634.57",
"ideal_spend": "3276.75",
"pace": "24",
"impressions": "24771",
"actions": "41",
"cpm": "2.08",
"ideal_cpm": "3.14",
"cpa": "16.00"
}];
Ready to run.
Test | Ops/sec | |
---|---|---|
Angular forEach |
| ready |
Native For Right |
| ready |
Lodash forEachRight |
| ready |
Custom |
| ready |
ES5 forEach |
| ready |
Lodash forEachLeft |
| ready |
Native For Left |
| ready |
for loop, super-cached i and stats length, simpler! |
| ready |
for of |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.