Skip to content

Commit

Permalink
Add a note on the post "Faster async functions and promises". (#737)
Browse files Browse the repository at this point in the history
* Add a note on the post

- note for behavior changed since 5 years ago
  • Loading branch information
sscoderati authored Feb 28, 2024
1 parent 25dcd97 commit 4b97dc7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/blog/fast-async.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ We’ve also been working on a new garbage collector, called Orinoco, which move

And last but not least, there was a handy bug in Node.js 8 that caused `await` to skip microticks in some cases, resulting in better performance. The bug started out as an unintended spec violation, but it later gave us the idea for an optimization. Let’s start by explaining the buggy behavior:

:::note
**Note:** The following behavior was correct according to the JavaScript spec at the time of writing. Since then, our spec proposal was accepted, and the following "buggy" behavior is now correct.
:::

```js
const p = Promise.resolve();

Expand Down

0 comments on commit 4b97dc7

Please sign in to comment.