Maybe I’m reading the post wrong, but what they say is they’ve improved the performance of Promises. And the charts actually even show that Promises are even faster then async/await.
I said “in the future”. Right now
Promise code performs better. The coming improvements are mentioned later on in the post.
Interesting. I’m not sure what makes it faster then hand written Promises. Unless they mean non optimal hand written Promises.
The article @thheller posted in August explains one reason why. The gist of it is:
The fundamental difference between
awaitand vanilla promises is that
await X()suspends execution of the current function, while
promise.then(X)continues execution of the current function after adding the
Xcall to the callback chain. In the context of stack traces, this difference is pretty significant.