promise comparisons

JavaScript performance comparison

Revision 69 of this test case created by

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
q
// async test
<script src="http://mstade.github.com/promise-jsperf/javascripts/q.js"></script>
var d = Q.defer()
d.promise.then(function done() {
  deferred.resolve()
})
d.resolve()
pending…
when
// async test
<script src="http://mstade.github.com/promise-jsperf/javascripts/when.js"></script>
var d = when.defer()
d.then(function done() {
  deferred.resolve()
})
d.resolve()
pending…
jquery
// async test
var d = $.Deferred()
d.then(function done() {
  deferred.resolve()
})
d.resolve()
pending…
RSVP
// async test
var p = new RSVP.Promise
p.then(function done() {
  deferred.resolve()
})
p.resolve()
pending…
Laissez-faire
// async test
var p = new Promise
p.then(function done() {
  deferred.resolve()
})
p.resolve()
pending…
avow
// async test
var v = avow()
v.promise.then(function done() {
  deferred.resolve()
})
v.fulfill()
pending…

Compare results of other browsers

Revisions

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

0 Comments