3 ms·
As graue and David wrote, the main point is not to win on this microbenchmark, but that core.async is competitive. Since a bare-bones version of promises is eas
by abecedarius 13y ago
As graue and David wrote, the main point is not to win on this microbenchmark, but that core.async is competitive. Since a bare-bones version of promises is easy to code, though, I tried it out for myself:
https://gist.github.com/darius/6326461 https://gist.github.com/darius/6326461
In Firefox Nightly it's usually slower than both of the OP's examples, while in Chrome it's substantially faster than both. So I'm curious how when.js goes faster on Firefox while supporting more features, and whether it could be tuned to catch up with my naive code on Chrome.