timeout vs delay 2

Benchmark created by emanuele parisio on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/prototype/1/prototype.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>

Setup

var test = function() {
      console.log("hi");
  }

Test runner

Ready to run.

Testing in
TestOps/sec
delay
_.delay(test , 500, "");
ready
setTimeout
setTimeout(function() {
    test; 
}, 500);
ready

Revisions

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

  • Revision 1: published by emanuele parisio on