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="//cdnjs.cloudflare.com/ajax/libs/async/0.9.0/async.js"></script>
async.concatAndApply = function(fn) {
return function(err, responses) {
return fn.apply(async, [err].concat(responses));
}
}
async.bindAndApply = function(fn) {
return function(err, responses) {
return fn.bind(async, err).apply(async, responses);
}
}
async.unshiftAndApply = function(fn) {
return function(err, responses) {
responses.unshift(err);
return fn.apply(async, responses);
}
}
function makeVariadic(parallelMethod) {
var _async = {};
_async.prototype = async;
_async.parallel = function(tasks, callback) {
return async.parallel(tasks, parallelMethod);
};
return function() {
return _async;
};
};
async.variadicConcatAndApply = makeVariadic(async.concatAndApply);
async.variadicBindAndApply = makeVariadic(async.bindAndApply);
async.variadicUnshiftAndApply = makeVariadic(async.unshiftAndApply);
function getThing1(callback) {
callback(null, 1);
}
function getThing2(callback) {
callback(null, 2);
}
function getThing3(callback) {
callback(null, 3);
}
Ready to run.
Test | Ops/sec | |
---|---|---|
concat and apply |
| ready |
bind and apply |
| ready |
unshift and apply |
| ready |
modify async - concat and apply |
| ready |
modify async - bind and apply |
| ready |
modify async - unshift and apply |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.