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
This is a comparison of different promise libraries, performing the most basic tasks of creating a promise, adding a then handler and then resolving the promise.
Recent benchmarks deliberately cripple bluebird but didn't force the same method on other libraries.
*Added ES6 Promise polyfill
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script src="https://rawgithub.com/cho45/jsdeferred/master/jsdeferred.js"></script>
<script src="https://rawgithub.com/petkaantonov/bluebird/master/js/browser/bluebird.js">
</script>
<script>
window.BluebirdPromise = window.Promise.noConflict();
</script>
<script src="https://rawgithub.com/calvinmetcalf/lie/master/dist/lie.noConflict.js"></script><script src="http://rsvpjs-builds.s3.amazonaws.com/rsvp-latest.js"></script>
<script src="https://rawgithub.com/calvinmetcalf/catiline/master/dist/catiline.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/q.js/0.9.6/q.min.js">
</script>
<script>
window.define = function(factory) {
try {
delete window.define;
} catch (e) {
window.define = void 0;
} // IE
window.when = factory();
};
window.define.amd = {};
</script>
<script src="https://rawgithub.com/cujojs/when/master/when.js"></script><script>
var worker = cw({
init:function(self){
self.on('ping',function(d){
self.fire('pong',d);
});
}
});
</script>
<script src="http://yui.yahooapis.com/3.14.0/build/yui/yui-min.js"></script>
<script>
YUI().use('promise', function (Y) {
window.Y = Y;
});
</script>
</script><script src="http://s3.amazonaws.com/es6-promises/promise-0.1.0.min.js"></script>
Ready to run.
Test | Ops/sec | |
---|---|---|
lie |
| ready |
when |
| ready |
RSVP |
| ready |
q |
| ready |
catiline |
| ready |
bluebird |
| ready |
yui |
| ready |
JQuery |
| ready |
ES6 Promise polyfill |
| ready |
YUI + ES6 Promise polyfill |
| ready |
JQuery + ES6 Promise polyfill |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.