4 ms·
Not having tested it personally I can't say, but I'd imagine it's a lot faster. I'd be more interested in how it compares to using postMessage which, from test
by bengillies 14y ago
Not having tested it personally I can't say, but I'd imagine it's a lot faster.
I'd be more interested in how it compares to using postMessage which, from testing, is definitely a lot faster than setTimeout (like fast enough to be worth switching to if available).
- wycats 14y ago`postMessage` is faster than `setTimeout` but is unreliable. For example, it's synchronous in IE8. I may add support for `postMessage`, but for now I support "new and reliable" and "old and reliable".
- bengillies 14y agoHmm, didn't know that, thanks. I suppose if you really wanted to you could add a test to see if postMessage was async or not...