Bluebird vs RSVP (v6)

Revision 6 of this benchmark created on


Description

Add some pressure :-)

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>

Test runner

Ready to run.

Testing in
TestOps/sec
Bluebird deferred
// async test
function make() {
  var resolver = Promise.pending()

    resolver.fulfill()

  return resolver.promise
}
var a = [];
var l = 25;

while(l--) {
     a.push(make())
}


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

    defer.resolve()

  return defer.promise
}

var a = [];
var l = 25;

while(l--) {
     a.push(make())
}


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

var a = [];
var l = 25;

while(l--) {
     a.push(make())
}


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

var a = [];
var l = 25;

while(l--) {
     a.push(make())
}


RSVP.all(a).then(function () { deferred.resolve() })
ready

Revisions

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