Simple comparison of initialization overhead for setInterval vs. setTimeout for a repeating timer. Since jsPerf doesn't currently do async testing, this test doesn't show the actual cost of executing the timer callbacks.
Ready to run.
|setTimeout w/predefined function|
|setInterval w/predefined function|
You can edit these tests or add more tests to this page by appending /edit to the URL.