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
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
function makeDataset(name) {
return {
window: name,
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"
};
}
var stats = [makeDataset("window")];
for (var i = 0; i < 10000; i++) {
stats.push(makeDataset(new String(i)));
}
var w, retObj;
function processDataset(dataset) {
w = dataset.window;
if (w === 'lifetime') {
delete dataset.window;
retObj = dataset;
}
}
Ready to run.
Test | Ops/sec | |
---|---|---|
Angular forEach |
| ready |
Native For |
| ready |
Native forEach |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.