promise comparisons (v155)

Revision 155 of this benchmark created by Ron Waldon on


Preparation HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/q.js/1.4.1/q.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/when/2.7.1/when.min.js"></script>
<script src="https://mstade.github.com/promise-jsperf/javascripts/rsvp.js"></script>
<script src="https://mstade.github.com/promise-jsperf/javascripts/avow.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bluebird/2.9.27/bluebird.min.js"></script>
<script>var Bluebird = Promise.noConflict();</script>
<script src="http://jokeyrhy.me/js/lie-2.9.1.noConflict.min.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
q
// async test
var d = Q.defer()
d.promise.then(function done() {
  deferred.resolve()
})
d.resolve()
ready
native promise
// async test
var d = new Promise(function(resolve) {
  resolve();
});
d.then(function() {
  deferred.resolve();
});
ready
Lie
// async test
var d = new Lie(function(resolve) {
  resolve();
});
d.then(function() {
  deferred.resolve();
});
ready
RSVP
// async test
var p = new RSVP.Promise
p.then(function done() {
  deferred.resolve()
})
p.resolve()
ready
avow
// async test
var v = avow()
v.promise.then(function done() {
  deferred.resolve()
})
v.fulfill()
ready
Bluebird
// async test
var d = new Bluebird(function(resolve) {
  resolve();
});
d.then(function() {
  deferred.resolve();
});
ready

Revisions

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