then / promise

Bare bones Promises/A+ implementation
https://www.promisejs.org
MIT License
2.58k stars 312 forks source link

Why promise. then is faster than setTimeout #151

Closed duuliy closed 5 years ago

edef1c commented 5 years ago

We're not using setTimeout(fn, 0), we're using require('asap/raw')(fn). That'll forward to setImmediate(fn), or something similarly fast.