setTimeout vs setInterval (v7)

Revision 7 of this benchmark created on


Preparation HTML

<script>
  function test1(){
        var blabla='jafang';
  }
  function test2(){
        var blabla='jafang';
        setTimeout(test2,1);
  }
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
'setInterval'
setInterval(test, 1);
ready
'setTimeout'
setTimeout(test2, 1);
ready

Revisions

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