setTimeout proxy parameters to callback

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
using setTimeout params
// async test
for (var i = 0; i < 10; i++) {
  setTimeout(function(number) {
    deferred.resolve(number)
  }, 0, i);
}
ready
closure wrapper
// async test
for (var i = 0; i < 10; i++) {
  (function(z) {
    setTimeout(function() {
      deferred.resolve(z)
    }, 0);
  })(i)
}
ready

Revisions

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