$.Deferred performance timing (v2)

Revision 2 of this benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>

Setup

function dr() {
      deferred.resolve(true);
      return true;
    }

Test runner

Ready to run.

Testing in
TestOps/sec
Function (Baseline)
// async test
var d = new $.Deferred();
//d.resolve();
deferred.resolve(true);
ready
Resolved Deferred
// async test
var d = new $.Deferred();
d.then(function(){
  deferred.resolve(true);
});
d.resolve();
ready

Revisions

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