4 ms·
Neat concept - and it looks like it could work in IE8+ (with some code changes) and everything else. One thing which may speed it up over many iterations is no
by invisible 17y ago
Neat concept - and it looks like it could work in IE8+ (with some code changes) and everything else.
One thing which may speed it up over many iterations is not setting the var fn and instead doing:
timeouts.shift()();
- richcollins 17y agoThe overhead of setting the var is negligible compared with the other things happening in the event loop.
- invisible 17y agoI suspected so, but I thought I'd throw that in anyway (who knows - maybe it would matter on IE). I prefer not setting variables if they're unneeded regardless.