Bluebird vs RSVP vs Native (v9)

Revision 9 of this benchmark created 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.js"></script>
<script src="https://rawgithub.com/petkaantonov/bluebird/master/js/browser/bluebird.js"></script>
<script>var BPromise = Promise.noConflict();
if ((Promise + "").indexOf("native") < 0) alert("not native promises");
</script>

Test runner

Ready to run.

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

make().then(function (v) { deferred.resolve()  })
ready
RSVP deferred
// async test
function make() {
  var defer = RSVP.defer()

    defer.resolve()

  return defer.promise
}

make().then(function () { deferred.resolve() })
ready
Bluebird classic
// async test
function make() {
  return new BPromise(function (resolve, reject) {
      resolve(1)
  })
}

make().then(function (v) { deferred.resolve()  })
ready
RSVP classic
// async test
function make() {
  return new RSVP.Promise(function (resolve, reject) {
      resolve(1)
  })
}

make().then(function (v) {deferred.resolve()  })
ready
Native Promises
function make() {
  return new Promise(function (resolve, reject) {
      resolve(1)
  })
}

make().then(function (v) { deferred.resolve()  })
ready

Revisions

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