await-test-godzilla-monkey-12

JavaScript performance comparison

Test case created by ruuk

Preparation code


      
      <script>
Benchmark.prototype.setup = function() {
  function resolver() {
      deferred.resolve();
  }
  
  function doSync() {
      a = "TESTa"
  }
  
  async function doAsync() {
      a = "TESTa"
  }
  
  async function syncCaller() {
      doSync()
  }
  
  async function asyncCaller() {
      await doAsync()
  }
  
  function syncTest() {
      syncCaller().then(resolver)
  }
  
  function asyncTest() {
      asyncCaller().then(resolver)
  }
  

};
</script>

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
No Await
// async test
syncTest()
pending…
With Await
// async test
asyncTest()
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