Bluebird vs RSVP vs Native (v76)

Revision 76 of this benchmark created by PetkaAntonov on


Description

A comparison of the two most highly performant promise implementations and the new native promises.

Preparation HTML

<script src="http://rsvpjs-builds.s3.amazonaws.com/rsvp-latest.min.js"></script>
<script src="http://petkaantonov.github.io/bluebird/cdn/bluebird-3.0.0.min.js"></script>

<script>
var BPromise = Promise.noConflict();
var RSVPPromise = RSVP.Promise;
if ((Promise + "").indexOf("native") < 0) alert("not native promises");
var deferred = {resolve: function() {}};
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Bluebird deferred
// async test
function make() {
  return new BPromise(function (resolve, reject) {
      resolve(1)
  })
}

    var total = 1000;
    var completed = 0;
    var l = total;
    function done() {
        if (++completed === total) deferred.resolve();
    }
    while(l--) {
        make().then(done);
    }
ready
RSVP deferred
 
ready
Bluebird classic
 
ready
RSVP classic
// async test
function make() {
  return new RSVPPromise(function (resolve, reject) {
      resolve(1)
  })
}

    var total = 1000;
    var completed = 0;
    var l = total;
    function done() {
        if (++completed === total) deferred.resolve();
    }
    while(l--) {
        make().then(done);
    }
ready
Native Promises
 
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.